/* ============================================================
   notifications.css — Notifications Page (/notifications)
   Namespace prefix: boh-notifs
   All values use design tokens from app.css (:root)
   ============================================================ */

/* --- LAYOUT OVERRIDE: hide shell chrome, self-managed full-height layout --- */
html:has(.boh-notifs),
body:has(.boh-notifs) {
  height: 100%;
  overflow: hidden;
}

body:has(.boh-notifs) .boh-shell {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body:has(.boh-notifs) .boh-shell__header,
body:has(.boh-notifs) .boh-shell__bottom {
  display: none;
}

body:has(.boh-notifs) .boh-shell__main {
  flex: 1;
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
}

/* --- ROOT CONTAINER --- */
.boh-notifs {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--boh-color-bg);
  font-family: var(--boh-font-sans);
}

/* --- HEADER --- */
.boh-notifs__header {
  padding: 2.5rem var(--boh-space-screen) 0.625rem var(--boh-space-screen);
  background-color: var(--boh-color-bg);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.boh-notifs__header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 2.5rem;
}

.boh-notifs__back-btn {
  position: absolute;
  left: 0;
  padding: 0.5rem;
  margin-left: -0.5rem;
  color: var(--boh-color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.boh-notifs__back-btn:active {
  transform: scale(0.95);
}

.boh-notifs__back-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

.boh-notifs__title {
  font-family: var(--boh-font-sans);
  font-size: var(--boh-font-size-navtitle);
  font-weight: var(--boh-font-weight-700);
  line-height: var(--boh-line-height-navtitle);
  color: var(--boh-color-primary);
  margin: 0;
}

/* --- SCROLLABLE MAIN --- */
.boh-notifs__main {
  flex: 1;
  overflow-y: auto;
  padding-left: var(--boh-space-screen);
  padding-right: var(--boh-space-screen);
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  padding-top: 1rem;
}

/* --- TAB STRIP --- */
.boh-notifs__tabs {
  display: flex;
  border-bottom: 1px solid color-mix(in srgb, var(--boh-color-border) 10%, transparent);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.boh-notifs__tab-btn {
  flex: 1;
  padding-bottom: 0.75rem;
  font-size: var(--boh-font-size-label);
  font-weight: var(--boh-font-weight-700);
  font-family: var(--boh-font-sans);
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
  text-align: center;
}

.boh-notifs__tab-label,
.boh-notifs__tab-count {
  display: inline-block;
}

.boh-notifs__tab-count {
  margin-left: 0.125rem;
}

.boh-notifs__tab-btn--active {
  color: var(--boh-color-primary);
}

.boh-notifs__tab-btn--inactive {
  color: color-mix(in srgb, var(--boh-color-muted) 50%, transparent);
}

/* Active tab underline indicator — matches React's h-0.5 bg-boh-primary rounded-t-full */
.boh-notifs__tab-btn--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--boh-color-primary);
  border-radius: 9999px 9999px 0 0;
}

.boh-notifs__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.9rem;
}

.boh-notifs__mark-all-btn {
  border: 1px solid color-mix(in srgb, var(--boh-color-primary) 25%, transparent);
  background-color: var(--boh-color-surface);
  color: var(--boh-color-primary);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: var(--boh-font-weight-700);
  padding: 0.45rem 0.85rem;
  cursor: pointer;
}

.boh-notifs__mark-all-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

/* --- NOTIFICATION LIST --- */
.boh-notifs__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* --- NOTIFICATION CARD — UNREAD VARIANT --- */
/* Tinted primary/5 background with accent dot — matches React unread block */
.boh-notifs__card {
  border-radius: var(--boh-radius-16);
  padding: 1rem;
  text-decoration: none;
  display: block;
  transition: transform 0.15s ease;
}

.boh-notifs__card:active {
  transform: scale(0.99);
}

.boh-notifs__card--unread {
  background-color: color-mix(in srgb, var(--boh-color-primary) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--boh-color-primary) 10%, transparent);
}

/* --- NOTIFICATION CARD — READ VARIANT --- */
/* White background, light border, soft shadow — matches React read block */
.boh-notifs__card--read {
  background-color: var(--boh-color-surface);
  border: 1px solid color-mix(in srgb, var(--boh-color-border) 10%, transparent);
  box-shadow: 0 1px 4px rgba(38, 86, 77, 0.04);
}

/* --- CARD HEADER ROW (title + dot) --- */
.boh-notifs__card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Unread dot indicator — accent circle, top-right of title */
.boh-notifs__card-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background-color: var(--boh-color-accent);
  flex-shrink: 0;
  margin-top: 0.375rem; /* mt-1.5 equivalent */
}

/* --- CARD TITLE --- */
.boh-notifs__card-title--unread {
  font-weight: var(--boh-font-weight-700);
  color: var(--boh-color-primary);
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
}

.boh-notifs__card-title--read {
  font-weight: var(--boh-font-weight-500);
  color: color-mix(in srgb, var(--boh-color-muted) 80%, transparent);
  font-size: 15px;
  line-height: 1.3;
  margin: 0;
}

/* --- CARD BODY --- */
.boh-notifs__card-body--unread {
  font-size: 14px;
  color: color-mix(in srgb, var(--boh-color-muted) 70%, transparent);
  margin: 0;
  line-height: 1.5;
}

.boh-notifs__card-body--read {
  font-size: 14px;
  color: color-mix(in srgb, var(--boh-color-muted) 60%, transparent);
  margin: 0;
  line-height: 1.5;
}

/* --- CARD TIMESTAMP --- */
.boh-notifs__card-time {
  font-size: 12px;
  color: color-mix(in srgb, var(--boh-color-muted) 50%, transparent);
  margin: 0.5rem 0 0 0;
}

/* --- EMPTY STATE --- */
.boh-notifs__empty {
  text-align: center;
  padding: 3rem 1rem;
  color: color-mix(in srgb, var(--boh-color-muted) 50%, transparent);
  font-size: var(--boh-font-size-label);
}

.boh-notifs__status {
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: var(--boh-radius-16);
  font-size: 14px;
  margin: 0 0 0.75rem 0;
}

.boh-notifs__status--empty {
  color: color-mix(in srgb, var(--boh-color-muted) 65%, transparent);
  background-color: color-mix(in srgb, var(--boh-color-surface) 90%, transparent);
}

.boh-notifs__status--error {
  color: var(--boh-color-danger);
  background-color: color-mix(in srgb, var(--boh-color-danger) 10%, transparent);
}
