/* ============================================================
   Uniqueue — notifications.css
   Office notifications (inbox page + header bell modal) and
   student/office notification drawer.
   Self-contained: office-notification.php only needs this file
   (no page-level shared-buttons.css or inline styles).
   Design tokens from theme.css (via includes/header.php).
   ============================================================ */


/* ── Buttons used on office-notification.php ──────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  padding: 0.5rem 1.1rem;
  height: 38px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-sm {
  font-size: 0.8rem;
  padding: 0.35rem 0.8rem;
  height: 32px;
}
.btn-primary {
  background: var(--brand-primary, #660810);
  color: var(--white, #fff);
  border-color: var(--brand-primary, #660810);
}
.btn-primary:hover {
  background: var(--brand-primary-dark, #450509);
  border-color: var(--brand-primary-dark, #450509);
}
.btn-ghost {
  background: var(--white, #fff);
  color: var(--ink-mid, #4a4a4a);
  border-color: var(--smoke, rgba(20,20,20,0.10));
}
.btn-ghost:hover {
  background: var(--mist, #f7f7f8);
  color: var(--ink, #1f1f1f);
}

/* ── Topbar (inbox page) ──────────────────────────────────── */
.od-wrap {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
}
.od-topbar {
  background: var(--white, #fff);
  border: 1px solid var(--smoke, #e8e8e8);
  border-radius: 12px;
  padding: 1rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 1px 3px rgba(102, 8, 16, 0.04);
}
.od-topbar__left h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink, #1f1f1f);
  margin: 0;
  line-height: 1.25;
}
.od-topbar__left p {
  font-size: 0.85rem;
  color: var(--ink-mid, #666);
  margin: 0.15rem 0 0;
}
.od-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.req-alert {
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  font-size: 0.88rem;
  line-height: 1.55;
}
.req-alert--error {
  background: var(--danger-light, #fbe0e0);
  border: 1.5px solid rgba(198, 40, 40, 0.25);
  color: var(--danger-dark, #b71c1c);
}


/* ── Office notification inbox (office-notification.php) ──── */
.notif-list { max-width: 720px; }
.notif-item {
  background: var(--white, #fff);
  border: 1px solid var(--smoke, #e5e7eb);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: background 0.15s ease;
}
.notif-item.is-unread {
  border-color: #fca5a5;
  background: #fff7f7;
}
.notif-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  margin-top: 0.4rem;
  flex-shrink: 0;
}
.notif-item.is-unread .notif-item__dot { background: #dc2626; }
.notif-item__body { flex: 1; min-width: 0; }
.notif-item__title {
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--ink, #1f1f1f);
}
.notif-item__msg {
  color: var(--ink-mid, #4b5563);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.notif-item__meta {
  font-size: 0.75rem;
  color: var(--ink-light, #9ca3af);
  margin: 0;
}
.notif-item__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.notif-empty {
  text-align: center;
  color: var(--ink-mid, #6b7280);
  padding: 3rem 1rem;
}


/* ── Notification drawer (shared) ─────────────────────────── */
.notif-backdrop,
.notif-drawer,
.notif-drawer * {
    font-family: 'Inter', sans-serif;
}

/* ── Backdrop: blurs + dims whatever is behind the drawer ────────────── */
.notif-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 10, 0.28);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 999;
}

.notif-backdrop--visible {
    opacity: 1;
    pointer-events: auto;
}

/* Everything with this class blurs slightly for extra "focus on the drawer"
   effect — applied to the main app wrapper while the drawer is open. */
.notif-content-blurred {
    filter: blur(2px);
    transition: filter .25s ease;
    pointer-events: none;
    user-select: none;
}

/* ── Drawer panel ──────────────────────────────────────────────────── */
.notif-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 380px;
    max-width: 88vw;
    background: #fff;
    box-shadow: 8px 0 32px rgba(20, 10, 10, 0.18);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.notif-drawer--open {
    transform: translateX(0);
}

.notif-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--smoke, #ede8e8);
    flex-shrink: 0;
}

.notif-drawer__header h2 {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ink, #1a0a0a);
    margin: 0 0 0.15rem;
}

.notif-drawer__subtitle {
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--ink-light, #8a7070);
    margin: 0;
}

.notif-drawer__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-light, #8a7070);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.notif-drawer__close:hover {
    background: var(--smoke, #ede8e8);
    color: var(--ink, #1a0a0a);
}

.notif-drawer__actions {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--smoke, #ede8e8);
    flex-shrink: 0;
}

.notif-drawer__actions .btn {
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

/* ── Scrollable list area ─────────────────────────────────────────── */
.notif-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.notif-items {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
    background: #fff;
    border: 1px solid var(--smoke, #ede8e8);
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .1s ease;
}

.notif-item:hover {
    border-color: var(--ink-faint, #c4b4b4);
}

.notif-item--unread {
    background: var(--red-soft, rgba(194, 16, 16, 0.05));
    border-color: var(--red-border, rgba(194, 16, 16, 0.18));
}

.notif-item__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-item__icon svg { width: 17px; height: 17px; }

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

.notif-item__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.notif-item__title {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--ink, #1a0a0a);
}

.notif-item__unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red, #C21010);
    flex-shrink: 0;
}

.notif-item__message {
    font-weight: 400;
    font-size: 0.81rem;
    color: var(--ink-mid, #4a3333);
    margin: 0.15rem 0 0.3rem;
    line-height: 1.4;
}

.notif-item__meta {
    font-weight: 400;
    font-size: 0.72rem;
    color: var(--ink-light, #8a7070);
}

.notif-item__time {
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--ink-faint, #c4b4b4);
    margin-top: 0.2rem;
}

/* ── Type -> color chips (mirrors mobile's STATUS_COLORS/STATUS_BG) ── */
.notif-item__icon--waiting     { background: rgba(180, 140, 20, .12); color: #a5780f; }
.notif-item__icon--called      { background: rgba(194, 16, 16, .12); color: var(--red, #C21010); }
.notif-item__icon--in_progress { background: rgba(30, 110, 200, .12); color: #1e6ec8; }
.notif-item__icon--completed   { background: rgba(30, 150, 90, .12); color: #1e964f; }
.notif-item__icon--cancelled   { background: rgba(120, 120, 120, .12); color: #6b6b6b; }

.notif-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--ink-light, #8a7070);
}
.notif-empty svg { color: var(--ink-faint, #c4b4b4); margin-bottom: 0.75rem; }
.notif-empty p {
    font-weight: 700;
    color: var(--ink-mid, #4a3333);
    margin: 0 0 0.25rem;
}
.notif-empty span {
    font-weight: 400;
    font-size: 0.85rem;
}

/* Note: .notif-bell / .notif-badge (the dot indicator) are already
   styled in assets/css/header.css — not redefined here to avoid
   overriding that. */

@media (max-width: 480px) {
    .notif-drawer { width: 100%; max-width: 100%; }
    .notif-drawer__body { padding: 0.85rem 0.9rem 1.5rem; }
}

/* ── Header notification bell + dropdown modal (notif-bell.php) ── */
.office-notif { display: inline-flex; align-items: center; margin: 0 0.5rem; vertical-align: middle; }
.office-notif__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: none; background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: inherit;
    padding: 0;
}
.office-notif__btn:hover { background: rgba(0,0,0,.06); }
.office-notif__badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}
.office-notif {
    position: relative;
    z-index: 20;
}
.office-notif__btn {
    position: relative;
    z-index: 21;
    pointer-events: auto !important;
    cursor: pointer;
}
/* Closed: never intercept clicks (hidden + pointer-events + visibility) */
.office-notif-modal[hidden],
.office-notif-modal:not(.is-open) {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
.office-notif-modal.is-open {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex !important;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 3.5rem 1rem 1rem;
    pointer-events: auto;
    visibility: visible;
}
.office-notif-modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(15, 23, 42, 0.35);
}
.office-notif-modal__panel {
    position: relative;
    width: 100%; max-width: 380px;
    max-height: min(70vh, 520px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,.18);
    display: flex; flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}
.office-notif-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}
.office-notif-modal__header h2 {
    margin: 0; font-size: 1rem; font-weight: 600;
}
.office-notif-modal__header-actions { display: flex; align-items: center; gap: 0.5rem; }
.office-notif-modal__link {
    border: none; background: none; color: #7f1d1d;
    font-size: 0.75rem; cursor: pointer; font-family: 'Inter', sans-serif;
}
.office-notif-modal__close {
    border: none; background: none; font-size: 1.4rem;
    line-height: 1; cursor: pointer; color: #6b7280; padding: 0 0.25rem;
}
.office-notif-modal__body {
    overflow-y: auto; flex: 1;
    padding: 0.25rem 0;
}
.office-notif-modal__empty {
    text-align: center; color: #9ca3af; padding: 2rem 1rem; margin: 0;
    font-size: 0.9rem;
}
.office-notif-item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: #fff;
    padding: 0.85rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-family: 'Inter', sans-serif;
    color: inherit;
    transition: background .12s;
}
.office-notif-item:hover { background: #f9fafb; }
.office-notif-item.is-unread { background: #fff7f7; }
.office-notif-item.is-unread:hover { background: #fef2f2; }
.office-notif-item__title {
    font-weight: 600; font-size: 0.875rem; margin: 0 0 0.2rem;
    display: flex; align-items: center; gap: 0.4rem;
}
.office-notif-item__title::before {
    content: '';
    width: 7px; height: 7px; border-radius: 50%;
    background: transparent; flex-shrink: 0;
}
.office-notif-item.is-unread .office-notif-item__title::before { background: #dc2626; }
.office-notif-item__msg {
    margin: 0; font-size: 0.8rem; color: #4b5563;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.office-notif-item__meta {
    margin: 0.35rem 0 0; font-size: 0.7rem; color: #9ca3af;
}