/* ============================================================
   Messages styles (communications.css)
   The member's in-app inbox + communication preference center.
   Parchment / dark navy / gold, Nunito. Mobile-first, full-screen
   overlay, matching the My Journey pattern.
   ============================================================ */

.linbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 620;
  display: none;
  background: #0f1c30;
}
.linbox-overlay.visible { display: block; }
body.linbox-open { overflow: hidden; }

.linbox-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.linbox-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #16263f 0%, #0f1c30 100%);
  border-bottom: 1.5px solid rgba(201, 150, 59, 0.45);
}
.linbox-topbar-title {
  flex: 1;
  text-align: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #e8d9b5;
  letter-spacing: 0.4px;
}
.linbox-close {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid rgba(201, 150, 59, 0.5);
  background: rgba(201, 150, 59, 0.10);
  color: #e8d9b5;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
}
.linbox-close:active { transform: scale(0.94); }
.linbox-topbar-spacer { width: 40px; flex-shrink: 0; }

/* ---------- tabs ---------- */
.linbox-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 14px 0;
  background: #0f1c30;
  border-bottom: 1px solid rgba(201, 150, 59, 0.18);
}
.linbox-tab {
  flex: 1;
  padding: 11px 8px;
  border: none;
  background: transparent;
  color: #b9c4d6;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
}
.linbox-tab.active {
  color: #e8d9b5;
  border-bottom-color: #c9963b;
}
.linbox-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 9px;
  background: #c9963b;
  color: #16263f;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}

.linbox-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 48px;
}

.linbox-loading {
  text-align: center;
  color: #b9c4d6;
  padding: 46px 16px;
  font-family: 'Nunito', sans-serif;
}

.linbox-empty {
  text-align: center;
  color: #b9c4d6;
  font-family: 'Nunito', sans-serif;
  padding: 36px 18px 10px;
}
.linbox-empty p { line-height: 1.6; font-size: 1rem; margin: 0 auto 18px; max-width: 440px; }
.linbox-empty-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 150, 59, 0.12);
  border: 1.5px solid rgba(201, 150, 59, 0.5);
  color: #c9963b;
}
.linbox-empty-icon svg { width: 30px; height: 30px; }

.linbox-cta {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  background: #c9963b;
  color: #16263f;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.linbox-cta:active { transform: scale(0.97); }

/* ---------- inbox list ---------- */
.linbox-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b9c4d6;
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  margin: 2px 2px 12px;
}
.linbox-linkbtn {
  border: none;
  background: transparent;
  color: #c9963b;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}
.linbox-linkbtn:active { opacity: 0.7; }

.linbox-list { display: flex; flex-direction: column; gap: 10px; }
.linbox-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1.5px solid rgba(201, 150, 59, 0.32);
  background: linear-gradient(180deg, #1a2d48 0%, #14233a 100%);
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
}
.linbox-item:active { transform: scale(0.995); }
.linbox-item.unread {
  border-color: rgba(201, 150, 59, 0.7);
  background: linear-gradient(180deg, #22344f 0%, #182943 100%);
}
.linbox-dot {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: transparent;
}
.linbox-item.unread .linbox-dot {
  background: #c9963b;
  box-shadow: 0 0 0 3px rgba(201, 150, 59, 0.22);
}
.linbox-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.linbox-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.linbox-item-title { color: #f2ead8; font-weight: 800; font-size: 1rem; }
.linbox-chip {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(201, 150, 59, 0.15);
  border: 1px solid rgba(201, 150, 59, 0.5);
  color: #e8d9b5;
  font-size: 0.72rem;
  font-weight: 800;
}
.linbox-item-body { color: #b9c4d6; font-size: 0.92rem; line-height: 1.5; }
.linbox-item-time { color: #7f8ea6; font-size: 0.78rem; font-weight: 700; }

/* ---------- preferences ---------- */
.linbox-hero { margin-bottom: 16px; }
.linbox-hero h2 {
  font-family: 'Nunito', sans-serif;
  color: #e8d9b5;
  font-size: 1.3rem;
  margin: 4px 0 8px;
}
.linbox-hero p { color: #b9c4d6; font-size: 0.95rem; line-height: 1.55; margin: 0; }

.linbox-prefs { display: flex; flex-direction: column; gap: 12px; }
.linbox-pref-card {
  border-radius: 14px;
  border: 1.5px solid rgba(201, 150, 59, 0.35);
  background: linear-gradient(180deg, #1a2d48 0%, #14233a 100%);
  padding: 14px 15px;
  font-family: 'Nunito', sans-serif;
}
.linbox-pref-name { color: #f2ead8; font-weight: 800; font-size: 1.02rem; }
.linbox-pref-desc { color: #b9c4d6; font-size: 0.86rem; margin-top: 2px; }
.linbox-pref-chans {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 12px;
}

.linbox-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.linbox-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.linbox-toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(201, 150, 59, 0.4);
  transition: background 0.16s ease;
  flex-shrink: 0;
}
.linbox-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8d9b5;
  transition: transform 0.16s ease;
}
.linbox-toggle input:checked + .linbox-toggle-track {
  background: #c9963b;
  border-color: #e8d9b5;
}
.linbox-toggle input:checked + .linbox-toggle-track .linbox-toggle-knob {
  transform: translateX(18px);
  background: #16263f;
}
.linbox-toggle input:disabled + .linbox-toggle-track { opacity: 0.5; }
.linbox-toggle-label { color: #d7deea; font-weight: 700; font-size: 0.9rem; }
