
.notif-bell {
  position: relative;
}

.notif-bell[hidden] {
  display: none;
}

.notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--sell, #ff4d5e);
  box-shadow: 0 0 0 2px var(--surface, #0d131b);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 17px;
  padding: 0 4px;
  text-align: center;
}

.notif-count[hidden] {
  display: none;
}

.notif-panel {
  position: fixed;
  top: 66px;
  right: 16px;
  z-index: 125;
  display: flex;
  width: min(400px, calc(100vw - 24px));
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.5);
  color: var(--text);
}

.notif-panel[hidden] {
  display: none;
}

.notif-head {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  padding: 11px 14px;
}

.notif-head h2 {
  flex: 1;
  margin: 0;
  font-size: 15px;
}

.notif-link {
  border: 0;
  background: transparent;
  color: var(--accent, #14f195);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px;
}

.notif-link:disabled {
  color: var(--text-muted);
  cursor: default;
}

.notif-icon-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
}

.notif-icon-button:hover,
.notif-icon-button:focus-visible {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text);
  outline: none;
}

.notif-icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notif-body {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notif-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent, #14f195) 8%, var(--surface));
  font-size: 12.5px;
  line-height: 1.35;
  padding: 10px 14px;
}

.notif-banner span {
  flex: 1;
}

.notif-button {
  flex: none;
  border: 1px solid color-mix(in srgb, var(--accent, #14f195) 50%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent, #14f195) 16%, transparent);
  color: var(--accent, #14f195);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
}

.notif-button.is-quiet {
  border-color: var(--border);
  background: transparent;
  color: var(--text-secondary);
}

.notif-button:disabled {
  cursor: default;
  opacity: 0.55;
}

.notif-item {
  position: relative;
  display: flex;
  width: 100%;
  gap: 11px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 12px 14px;
  text-align: left;
}

.notif-item:hover,
.notif-item:focus-visible {
  background: color-mix(in srgb, var(--text) 5%, transparent);
  outline: none;
}

.notif-item.is-unread::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #14f195);
}

.notif-glyph {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #14f195) 14%, var(--surface));
  color: var(--accent, #14f195);
}

.notif-glyph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif-glyph svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notif-text {
  min-width: 0;
  flex: 1;
}

.notif-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}

.notif-note {
  display: block;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.notif-time {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
}

.notif-image {
  height: auto;
  display: block;
  width: 100%;
  max-height: 130px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: zoom-in;
  object-fit: cover;
}

.notif-lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 0.86);
  padding: 16px;
}

.notif-lightbox[hidden] {
  display: none;
}

.notif-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.6);
  object-fit: contain;
}

.notif-lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.notif-lightbox-close:hover,
.notif-lightbox-close:focus-visible {
  background: rgb(255 255 255 / 0.26);
  outline: none;
}

.notif-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 34px 20px;
  text-align: center;
}

.notif-more {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12.5px;
  padding: 12px;
}

.notif-section {
  border-bottom: 1px solid var(--border);
  padding: 12px 14px;
}

.notif-section h3 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notif-device {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.35;
}

.notif-device span {
  flex: 1;
  color: var(--text-secondary);
}

.notif-device-actions {
  display: flex;
  gap: 6px;
}

.notif-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 0;
}

.notif-toggle-text {
  min-width: 0;
  flex: 1;
}

.notif-toggle-text strong {
  display: block;
  font-size: 13px;
}

.notif-toggle-text span {
  display: block;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.3;
}

.notif-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  margin-top: 1px;
}

.notif-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.notif-switch i {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.15s ease;
}

.notif-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.notif-switch input:checked + i {
  background: var(--accent, #14f195);
}

.notif-switch input:checked + i::after {
  transform: translateX(16px);
}

.notif-switch input:disabled {
  cursor: default;
}

.notif-switch input:disabled + i {
  opacity: 0.5;
}

.notif-quiet {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.notif-quiet input[type="time"] {
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised, var(--surface));
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  padding: 0 8px;
}

.notif-status {
  min-height: 16px;
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 6px 14px 10px;
}

.notif-prompt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  background: rgb(3 6 12 / 0.62);
  backdrop-filter: blur(2px);
  padding: 16px;
}

.notif-prompt-backdrop[hidden] {
  display: none;
}

.notif-prompt {
  width: min(100%, 400px);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.55);
  color: var(--text);
  padding: 24px 22px 20px;
  text-align: center;
}

.notif-prompt-icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, #14f195) 15%, var(--surface));
  color: var(--accent, #14f195);
}

.notif-prompt-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notif-prompt h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.notif-prompt p {
  margin: 0 0 6px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.45;
}

.notif-prompt ul {
  margin: 12px 0 4px;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: left;
}

.notif-prompt li {
  padding: 3px 0 3px 22px;
  position: relative;
}

.notif-prompt li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent, #14f195);
}

.notif-prompt-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.notif-prompt-actions .notif-button {
  padding: 11px 14px;
  font-size: 14px;
}

.notif-prompt-error {
  margin-top: 10px;
  color: var(--sell, #ff5d6c);
  font-size: 12.5px;
}

@media (max-width: 640px) {
  .notif-panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}
