/* ============================================================
   ADMIN — notification dropdown + dropdown fixes
   ============================================================ */

/* Notification dropdown */
.notif-dropdown {
  position: fixed;
  width: 380px;
  max-width: calc(100vw - 32px);
  max-height: 480px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.notif-dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
}

.notif-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
}

.notif-dropdown__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.notif-dropdown__mark-all {
  background: none;
  border: none;
  font-size: var(--text-xs);
  color: var(--color-primary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: inherit;
}
.notif-dropdown__mark-all:hover { background: var(--color-primary-subtle); }

.notif-dropdown__list { list-style: none; padding: 0; margin: 0; }

.notif-dropdown__item {
  border-bottom: 1px solid var(--border-subtle);
}
.notif-dropdown__item:last-child { border-bottom: none; }

.notif-dropdown__item-link {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}
.notif-dropdown__item-link:hover { background: var(--bg-subtle); }

.notif-dropdown__item.is-unread .notif-dropdown__item-link {
  background: color-mix(in srgb, var(--color-primary) 4%, var(--bg-surface));
}

.notif-dropdown__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-dropdown__icon svg { width: 16px; height: 16px; }

.notif-dropdown__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.notif-dropdown__head-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.notif-dropdown__item-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-snug);
}

.notif-dropdown__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-primary);
  flex-shrink: 0;
}

.notif-dropdown__item-detail {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.notif-dropdown__item-time {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.notif-dropdown__empty {
  padding: var(--space-7) var(--space-4);
  text-align: center;
  color: var(--text-tertiary);
}
.notif-dropdown__empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-3);
  opacity: 0.4;
}
.notif-dropdown__empty p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.notif-dropdown__empty-sub {
  font-size: var(--text-xs);
  margin-top: 4px !important;
  color: var(--text-tertiary) !important;
}

/* ============================================================
   DARK-MODE DROPDOWN FIX
   The native <select> rendered fully white-on-white in dark mode.
   Override with explicit colors.
   ============================================================ */
select.lb-toolbar__sort-select,
select.admin-select {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-family: inherit;
  cursor: pointer;

  /* Override native appearance to ensure consistent rendering */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Chevron via background-image so it inherits color (works in dark mode) */
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: var(--space-6);
}

select.lb-toolbar__sort-select:hover,
select.admin-select:hover {
  border-color: var(--border-strong);
}

select.lb-toolbar__sort-select:focus-visible,
select.admin-select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-color: var(--color-primary);
}

/* The <option> dropdown list itself — colored by browser, but at least
   ensure the dropdown panel's typography matches our font in dark mode */
select.lb-toolbar__sort-select option,
select.admin-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}
