:root {
  --cl-notification-blue: #0b2e6b;
  --cl-notification-green: #67c23a;
  --cl-notification-yellow: #ffc72c;
  --cl-notification-border: #dde4ef;
  --cl-notification-muted: #66758c;
}

.cl-notification-trigger {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-width: 76px;
  min-height: 48px;
  padding: 0.4rem 0.65rem;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--cl-notification-blue);
  font: inherit;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.cl-notification-trigger:hover,
.cl-notification-trigger:focus-visible,
.cl-notification-trigger[aria-expanded="true"] {
  background: rgba(11, 46, 107, 0.07);
  transform: translateY(-1px);
}

.cl-notification-trigger:focus-visible,
.cl-notification-panel button:focus-visible,
.cl-notification-item:focus-visible {
  outline: 3px solid rgba(103, 194, 58, 0.2);
  outline-offset: 2px;
}

.cl-notification-trigger__icon {
  width: 1.28rem;
  height: 1.28rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-notification-trigger__label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.cl-notification-badge {
  position: absolute;
  top: 0;
  right: 0.32rem;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.32rem;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e53e5f;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(196, 43, 73, 0.25);
}

.cl-notification-panel {
  position: fixed;
  z-index: 1000;
  width: min(410px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 96px));
  overflow: hidden;
  border: 1px solid rgba(221, 228, 239, 0.96);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  color: #1f2937;
  box-shadow: 0 28px 70px rgba(11, 46, 107, 0.2);
  backdrop-filter: blur(18px);
}

.cl-notification-panel[hidden] {
  display: none !important;
}

.cl-notification-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border-bottom: 1px solid rgba(221, 228, 239, 0.82);
}

.cl-notification-panel__title {
  margin: 0;
  color: var(--cl-notification-blue);
  font-size: 1.15rem;
  font-weight: 800;
}

.cl-notification-panel__subtitle {
  margin: 0.18rem 0 0;
  color: var(--cl-notification-muted);
  font-size: 0.78rem;
}

.cl-notification-mark-all {
  flex: 0 0 auto;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 10px;
  background: rgba(11, 46, 107, 0.07);
  color: var(--cl-notification-blue);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.cl-notification-panel__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.cl-notification-system {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(11, 46, 107, 0.15);
  border-radius: 10px;
  background: rgba(103, 194, 58, 0.12);
  color: #32731f;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.cl-notification-system:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.cl-notification-mark-all:disabled {
  cursor: default;
  opacity: 0.45;
}

.cl-notification-list {
  max-height: min(510px, calc(100vh - 205px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.cl-notification-item {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.82rem;
  width: 100%;
  padding: 1rem 1.15rem;
  border: 0;
  border-bottom: 1px solid rgba(221, 228, 239, 0.65);
  background: #fff;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease;
}

.cl-notification-item:hover {
  background: #f8faff;
}

.cl-notification-item.is-unread {
  background: rgba(103, 194, 58, 0.075);
}

.cl-notification-item.is-unread::after {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cl-notification-green);
  content: "";
  transform: translateY(-50%);
}

.cl-notification-item__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(11, 46, 107, 0.08);
  color: var(--cl-notification-blue);
}

.cl-notification-item__icon[data-type="favorite"] {
  background: #fff0f3;
  color: #d64463;
}

.cl-notification-item__icon[data-type="reserved"] {
  background: #fff6d7;
  color: #906b00;
}

.cl-notification-item__icon[data-type="sold"] {
  background: #eaf6e4;
  color: #3f8a25;
}

.cl-notification-item__icon svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-notification-item__copy {
  min-width: 0;
  padding-right: 0.55rem;
}

.cl-notification-item__title {
  margin: 0;
  overflow: hidden;
  color: var(--cl-notification-blue);
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cl-notification-item__body {
  display: -webkit-box;
  margin: 0.28rem 0 0;
  overflow: hidden;
  color: #52627a;
  font-size: 0.79rem;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cl-notification-item__time {
  display: block;
  margin-top: 0.42rem;
  color: #8793a5;
  font-size: 0.69rem;
  font-weight: 600;
}

.cl-notification-empty,
.cl-notification-loading {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 2rem;
  color: var(--cl-notification-muted);
  text-align: center;
}

.cl-notification-empty strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--cl-notification-blue);
}

.cl-notification-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  max-width: min(360px, calc(100vw - 40px));
  padding: 0.9rem 1.05rem;
  border-radius: 14px;
  background: rgba(11, 46, 107, 0.97);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 18px 36px rgba(11, 46, 107, 0.25);
}

@media (max-width: 700px) {
  .cl-notification-trigger {
    min-width: 0;
    flex: 1 1 auto;
  }

  .cl-notification-panel {
    top: 76px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto;
    max-height: calc(100vh - 92px);
  }

  .cl-notification-list {
    max-height: calc(100vh - 205px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cl-notification-trigger,
  .cl-notification-item {
    transition: none;
  }
}
