/*
 * orientation-mobile.css
 * enlightenMEnt Live v2 — EarthRock & Threshold Mobile Design System
 *
 * Add to index.html AFTER mobile.css:
 *   <link rel="stylesheet" href="orientation-mobile.css">
 *
 * Design direction: Refined Natural — Apple Health + luxury resort
 * Tokens from architecture doc Section 10 (mobile.css variables)
 */

/* ─── Tokens (mirrors mobile.css — safe to redefine) ───────────────────── */
:root {
  --forest:        #28724f;
  --forest-dark:   #0f2419;
  --forest-dim:    rgba(40, 114, 79, 0.10);
  --surface:       #f7f9f7;
  --surface-2:     #eef3ef;
  --surface-card:  #ffffff;
  --border:        rgba(40, 114, 79, 0.13);
  --tab-h:         72px;

  --orient-radius:     16px;
  --orient-radius-sm:  10px;
  --orient-shadow:     0 2px 12px rgba(15, 36, 25, 0.08), 0 1px 3px rgba(15, 36, 25, 0.05);
  --orient-shadow-lg:  0 8px 32px rgba(15, 36, 25, 0.14), 0 2px 8px rgba(15, 36, 25, 0.08);
}

/* ─── Page Wrapper ──────────────────────────────────────────────────────── */
.orient-mobile-wrap {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--tab-h, 72px));
  background: var(--surface);
  padding-bottom: calc(var(--tab-h, 72px) + 24px);
}

/* ─── Header ────────────────────────────────────────────────────────────── */
.orient-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 0;
  gap: 12px;
}

.orient-header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.orient-title-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--forest);
  opacity: 0.7;
}

.orient-title-main {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--forest-dark);
  line-height: 1.15;
  margin: 0;
}

.orient-add-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--forest);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 4px 14px rgba(40, 114, 79, 0.35);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.18s ease;
}

.orient-add-btn:active {
  transform: scale(0.91);
  box-shadow: 0 2px 6px rgba(40, 114, 79, 0.25);
}

/* ─── Stats Row ─────────────────────────────────────────────────────────── */
.orient-stats-row {
  display: flex;
  gap: 10px;
  padding: 16px 20px 4px;
}

.orient-stat-pill {
  flex: 1;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--orient-radius-sm);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: var(--orient-shadow);
}

.orient-stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest-dark);
  line-height: 1;
}

.orient-stat-lbl {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  opacity: 0.65;
}

/* ─── Filter Chips ──────────────────────────────────────────────────────── */
.orient-chips-scroll {
  display: flex;
  gap: 8px;
  padding: 16px 20px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.orient-chips-scroll::-webkit-scrollbar { display: none; }

/* chip and chip.active reuse mobile.css — supplemented here for safety */
.orient-chips-scroll .chip {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--surface-card);
  color: var(--forest-dark);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.16s ease;
  flex-shrink: 0;
}

.orient-chips-scroll .chip.active {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
  box-shadow: 0 3px 10px rgba(40, 114, 79, 0.28);
}

/* ─── Section Label ─────────────────────────────────────────────────────── */
.orient-section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--forest);
  opacity: 0.6;
  padding: 20px 20px 8px;
}

/* ─── Session List ──────────────────────────────────────────────────────── */
.orient-session-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px;
}

/* ─── Session Card ──────────────────────────────────────────────────────── */
.orient-session-card {
  background: var(--surface-card);
  border-radius: var(--orient-radius);
  border: 1px solid var(--border);
  box-shadow: var(--orient-shadow);
  overflow: hidden;           /* required for addSwipeRow */
  position: relative;         /* required for addSwipeRow */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.16s ease;
}

.orient-session-card:active {
  transform: scale(0.985);
  box-shadow: var(--orient-shadow);
}

.orient-session-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  min-height: 78px;
}

.orient-session-card-left {
  flex-shrink: 0;
}

.orient-session-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orient-icon-green {
  background: var(--forest-dim);
  color: var(--forest);
}

.orient-icon-blue {
  background: rgba(37, 99, 235, 0.09);
  color: #2563eb;
}

.orient-session-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.orient-session-label {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--forest-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orient-session-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.orient-session-date {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: var(--forest-dark);
  opacity: 0.5;
}

.orient-session-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: var(--forest-dark);
  opacity: 0.55;
}

.orient-session-card-right {
  flex-shrink: 0;
  color: var(--forest-dark);
  opacity: 0.25;
}

.orient-chevron {
  display: block;
}

/* ─── Badge overrides (supplement mobile.css) ───────────────────────────── */
.badge {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 100px;
  display: inline-block;
  line-height: 1.5;
}

.badge-green  { background: rgba(40,114,79,0.12);  color: #1a5c36; }
.badge-amber  { background: rgba(217,119,6,0.12);  color: #92400e; }
.badge-red    { background: rgba(239,68,68,0.12);  color: #991b1b; }
.badge-blue   { background: rgba(37,99,235,0.12);  color: #1e3a8a; }
.badge-gray   { background: rgba(0,0,0,0.07);      color: #555;    }

/* ─── Detail Slide-In Panel ─────────────────────────────────────────────── */
.orient-detail-panel {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  z-index: 300;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  /* iOS-style sheet slide */
  will-change: transform;
}

.orient-detail-panel--open {
  transform: translateX(0);
}

/* ─── Detail Header ─────────────────────────────────────────────────────── */
.orient-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 12px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(15,36,25,0.06);
  flex-shrink: 0;
}

.orient-detail-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--forest-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: background 0.14s;
}

.orient-detail-back:active { background: var(--surface-2); }

.orient-detail-header-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.orient-detail-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--forest);
  opacity: 0.7;
}

.orient-detail-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest-dark);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orient-detail-date {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: var(--forest-dark);
  opacity: 0.5;
}

/* ─── Detail Body ───────────────────────────────────────────────────────── */
.orient-detail-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h, 72px) + 24px);
}

/* ─── Attendee Count Bar ────────────────────────────────────────────────── */
.orient-attendee-count-bar {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--forest);
  opacity: 0.6;
  padding: 18px 20px 8px;
}

/* ─── Attendee List ─────────────────────────────────────────────────────── */
.orient-attendee-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 24px;
}

/* ─── Attendee Row — div-based, supports addSwipeRow ────────────────────── */
.orient-attendee-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 20px;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  position: relative;          /* REQUIRED by addSwipeRow */
  overflow: hidden;            /* REQUIRED by addSwipeRow */
  min-height: 72px;
  -webkit-tap-highlight-color: transparent;
}

/* Row content must sit ABOVE the absolutely-positioned swipe panels (z-index:1) */
.orient-attendee-row .orient-avatar,
.orient-attendee-row .list-row-avatar,
.orient-attendee-row .orient-attendee-info,
.orient-attendee-row .orient-attendee-right {
  position: relative;
  z-index: 2;
}

.orient-attendee-row:first-child {
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Avatar — reuses .list-row-avatar token from mobile.css */
.orient-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--forest-dim);
  color: var(--forest);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.orient-attendee-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.orient-attendee-name {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--forest-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orient-attendee-dept,
.orient-attendee-email {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: var(--forest-dark);
  opacity: 0.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orient-attendee-right {
  flex-shrink: 0;
}

/* ─── Modal Styles ──────────────────────────────────────────────────────── */
.orient-modal-wrap {
  padding: 8px 4px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.orient-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--forest-dark);
  margin: 0 0 4px;
  padding: 0 4px;
}

.orient-modal-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  color: var(--forest-dark);
  opacity: 0.55;
  padding: 0 4px;
  margin-bottom: 20px;
}

.orient-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 4px;
}

.orient-form-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  opacity: 0.7;
  margin-top: 8px;
  display: block;
}

/* form-input-mob and btn-primary-mob come from mobile.css */
/* Supplement: ensure select matches input height */
.orient-form select.form-input-mob {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%2328724f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.orient-cancel-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--forest-dark);
  cursor: pointer;
  transition: background 0.14s;
}

.orient-cancel-btn:active { background: var(--surface-2); }

/* ─── Empty & Loading States ────────────────────────────────────────────── */
.orient-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
  text-align: center;
  color: var(--forest-dark);
  opacity: 0.55;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
}

.orient-attendee-loading {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--forest-dark);
  opacity: 0.45;
  padding: 40px 20px;
  text-align: center;
}

/* ─── Skeleton Loader ───────────────────────────────────────────────────── */
@keyframes orient-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

.orient-skeleton-card {
  pointer-events: none;
  background: var(--surface-card);
  padding: 16px;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.orient-skeleton-line {
  height: 13px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 800px 100%;
  animation: orient-shimmer 1.4s infinite ease-in-out;
}

.orient-skeleton-line.w-60 { width: 60%; }
.orient-skeleton-line.w-40 { width: 40%; }
.orient-skeleton-line.w-30 { width: 30%; }

.orient-skeleton-chip {
  display: inline-block;
  width: 80px;
  height: 34px;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 50%, var(--surface-2) 75%);
  background-size: 800px 100%;
  animation: orient-shimmer 1.4s infinite ease-in-out;
}

/* ─── Swipe Action Buttons (rendered by addSwipeRow engine) ─────────────── */
/* The swipe engine in app.js appends absolutely-positioned action divs.     */
/* These selectors ensure they render correctly on the attendee row.         */
.orient-attendee-row [data-swipe-action] {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 80px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
}

/* ─── Desktop: hide mobile-only panel, revert to existing table render ───── */
@media (min-width: 768px) {
  .orient-detail-panel { display: none !important; }
  .orient-mobile-wrap  { display: none !important; }
}

/* ─── Attendee table — div-based so overflow:hidden works for swipe ─────── */
/* <tr> ignores overflow:hidden per CSS spec, so swipe action panels would
   always render visible. Flexbox divs solve this. */
.orient-att-table {
  width: 100%;
  font-size: 12px;
}
.orient-att-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--bd);
  background: var(--bg-1);
  position: relative;
  overflow: hidden;
  min-height: 36px;
}
.orient-att-row.orient-att-header {
  background: var(--bg-2);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tx-3);
  min-height: 32px;
}
.orient-att-row:not(.orient-att-header):hover {
  background: var(--bg-2);
}
.orient-att-cell {
  padding: 7px 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  background: inherit; /* opaque cover for swipe action panels behind */
}
.orient-att-col-name    { flex: 0 0 18%; font-weight: 500; }
.orient-att-col-dept    { flex: 0 0 14%; color: var(--tx-3); }
.orient-att-col-program { flex: 0 0 14%; }
.orient-att-col-date    { flex: 0 0 14%; color: var(--tx-3); }
.orient-att-col-team    { flex: 1 1 auto; color: var(--tx-3); }
.orient-att-col-email   { flex: 0 0 22%; }
.orient-att-col-actions { flex: 0 0 64px; padding: 4px 6px; white-space: nowrap; }
@media (max-width: 767px) {
  /* On mobile, the inline edit/delete column is replaced by swipe actions */
  .orient-att-col-actions { display: none; }
}
