/* Sway This Way admin portal CSS.
 * Extends the design tokens/base styles in site.css (link that FIRST, then
 * this) with the extra pieces the public marketing page doesn't need:
 * forms, data tables, dashboard cards, status pills, auth screens. */

.portal-header{
  position:fixed; top:0; left:0; right:0; z-index:100;
  backdrop-filter:blur(16px) saturate(140%);
  background:rgba(10,7,13,0.65);
  border-bottom:1px solid rgba(255,255,255,0.06);
}
.portal-nav{display:flex; align-items:center; justify-content:space-between; padding:16px 32px; max-width:1180px; margin:0 auto;}
.portal-nav .logo{font-family:'Fraunces', serif; font-size:20px; font-weight:600;}
.portal-nav .logo span{background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;}
.portal-nav-links{display:flex; gap:24px; align-items:center;}
.portal-nav-links a, .portal-nav-links button.link{font-size:14px; color:var(--ink-1); background:none; border:none; cursor:pointer; font-family:inherit;}
.portal-nav-links a:hover, .portal-nav-links button.link:hover{color:var(--ink-0);}
/* "Signed in as ___" (see portal.js) — dimmer than the actual nav links
 * since it's a label, not something clickable. */
.portal-nav-links .signed-in-as{font-size:13px; color:var(--ink-2);}

/* Admin nav dropdown groups (templates/admin_nav.html, wired up in
 * portal.js). Added 2026-08-24 — the admin bar was a flat list that had
 * grown to 6 links and would only keep growing; this groups related pages
 * (Accounts, Moderation) behind a click-to-open menu so the always-visible
 * bar stays a constant width regardless of how many pages end up inside a
 * group later. Positioned/styled to match the existing .dob-calendar-panel
 * popover further down this file — same dark card, border, and shadow
 * language, so it reads as part of the same design system rather than a
 * bolted-on menu component. */
.nav-dropdown{position:relative;}
.nav-dropdown-toggle{
  display:flex; align-items:center; gap:5px;
  background:none; border:none; padding:0; margin:0;
  font-size:14px; font-family:inherit; color:var(--ink-1); cursor:pointer;
}
.nav-dropdown-toggle:hover, .nav-dropdown.open .nav-dropdown-toggle, .nav-dropdown.has-active .nav-dropdown-toggle{
  color:var(--ink-0);
}
.nav-caret{width:9px; height:9px; flex-shrink:0; transition:transform .2s;}
.nav-dropdown.open .nav-caret{transform:rotate(180deg);}

.nav-dropdown-menu{
  position:absolute; top:calc(100% + 16px); left:50%; transform:translateX(-50%);
  min-width:196px; z-index:150;
  background:var(--bg-1); border:1px solid var(--card-border); border-radius:14px;
  padding:8px; box-shadow:0 20px 50px rgba(0,0,0,0.5);
  display:none; flex-direction:column; gap:2px;
}
.nav-dropdown.open .nav-dropdown-menu{display:flex;}
.nav-dropdown-menu a{
  padding:9px 12px; border-radius:8px; font-size:14px; color:var(--ink-1);
  white-space:nowrap; transition:background .15s, color .15s;
}
.nav-dropdown-menu a:hover{background:rgba(255,255,255,0.06); color:var(--ink-0);}

/* Current-page highlighting (set by portal.js) — applies both to the flat
 * top-level links and to links inside an open dropdown menu. */
.portal-nav-links > a.active{color:var(--accent-1); font-weight:600;}
.nav-dropdown-menu a.active{color:var(--accent-1); font-weight:600; background:rgba(94,200,216,0.1);}

/* Small number badge, reused wherever a nav link needs to say "N things
 * are waiting on you here" rather than just yes/no. Originally added
 * 2026-08-27 for the "Messages" link (populated by portal.js from GET
 * /v1/messages/unread-count, hidden via [hidden] whenever there's nothing
 * unread) per Jamie ("no way to tell if you have new messages"). Reused
 * as-is from 2026-09-07 on the Moderation dropdown's #nav-photo-queue and
 * #nav-photo-reports links (see portal.js) — same shape, same meaning,
 * just a different source count, so no new CSS was needed for that.
 * Uses --danger — already the design system's one alert/attention color
 * (see site.css) — rather than a new color, so every use of this badge
 * reads as "needs attention" consistently instead of a bespoke chip. */
.nav-badge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:18px; height:18px; padding:0 5px; margin-left:6px;
  border-radius:9px; background:var(--danger); color:#fff;
  font-size:11px; font-weight:700; line-height:1; vertical-align:middle;
}
.nav-badge[hidden]{display:none;}

/* Moderation nav dropdown attention dot — a plain "something's waiting"
 * signal (deliberately no count, per Jamie's call) on the Moderation
 * dropdown toggle button, shown whenever the Photo Queue and/or Reported
 * Photos queues have anything pending (GET
 * /v1/admin/moderation/pending-count). Added 2026-09-01. Same --danger
 * "needs attention" color as .nav-badge above, just a bare dot rather
 * than a number — see portal.js for how it's toggled. */
.nav-dot{
  display:inline-block; width:8px; height:8px; margin-left:2px;
  border-radius:50%; background:var(--danger); vertical-align:middle;
  flex-shrink:0;
}
.nav-dot[hidden]{display:none;}

/* Mobile nav — hamburger toggle for .portal-nav-links. Added 2026-08-25:
 * unlike the marketing homepage's nav (see site.css's own .mobile-menu-btn/
 * .mobile-nav-panel, shipped earlier the same day), nothing here EVER
 * collapsed for a narrow viewport — every portal page (member pages'
 * hand-copied <nav>, and the shared admin_nav.html) just rendered
 * .portal-nav-links as a plain flex row with no @media rule touching it
 * at all, so it crowded or wrapped raggedly well before phone width.
 *
 * This toggles the SAME .portal-nav-links element every page already
 * renders its own links into, rather than duplicating that link list into
 * a separate mobile-only block the way the marketing nav needed to (that
 * nav's mobile content genuinely differs from its desktop content — see
 * index.html) — every portal page's mobile and desktop nav is the exact
 * same links, so one shared CSS/JS toggle (here and in portal.js) covers
 * every portal page. Each page still needs its own hamburger <button>
 * markup added next to its <nav> (or, for the 7 admin pages, the one
 * shared admin_nav.html) since there's no shared header template across
 * member pages — see admin_nav.html's doc comment on why that page list
 * still hand-copies its <nav> block instead of a define.
 *
 * Breakpoint is 900px, wider than the marketing site's 840px: the busiest
 * member-page nav (Browse/Connections/Viewed Me/My Profile/My Albums/Sign
 * out — 6 items) needs the extra room before it stops crowding.
 */
.mobile-menu-btn{
  display:none; align-items:center; justify-content:center;
  width:40px; height:40px; border-radius:10px;
  border:1px solid rgba(255,255,255,0.14); background:rgba(255,255,255,0.06);
  color:var(--ink-0); cursor:pointer; flex-shrink:0;
}
.mobile-menu-btn:hover{background:rgba(255,255,255,0.11);}
.mobile-menu-btn svg{width:20px; height:20px;}

@media(max-width:900px){
  .mobile-menu-btn{display:flex;}

  .portal-nav-links{
    display:none; flex-direction:column; align-items:stretch; gap:0;
    position:absolute; top:100%; left:0; right:0;
    max-height:calc(100vh - 100%); overflow-y:auto;
    background:rgba(10,7,13,0.97); backdrop-filter:blur(16px) saturate(140%);
    border-bottom:1px solid rgba(255,255,255,0.06);
    padding:4px 32px 24px;
  }
  .portal-nav-links.open{display:flex;}
  .portal-nav-links > a, .portal-nav-links > button.link{
    padding:15px 2px; font-size:16px; width:100%; text-align:left;
    border-bottom:1px solid rgba(255,255,255,0.06);
  }
  .portal-nav-links > .signed-in-as{
    padding:15px 2px 4px; border-bottom:none;
  }
  .portal-nav-links > *:last-child{border-bottom:none;}

  /* Admin dropdowns (Accounts/Moderation) — inside the vertical mobile
   * panel these render as inline expandable sections instead of the
   * desktop popover, so they don't try to float centered under a button
   * that's no longer sitting in a horizontal bar. The open/close toggle
   * itself is unchanged (still driven by portal.js adding/removing
   * .open) — only the layout changes here. */
  .nav-dropdown{width:100%;}
  .nav-dropdown-toggle{
    width:100%; justify-content:space-between;
    padding:15px 2px; border-bottom:1px solid rgba(255,255,255,0.06);
  }
  .nav-dropdown.open .nav-dropdown-toggle{border-bottom:none;}
  .nav-dropdown-menu{
    position:static; transform:none; width:100%; min-width:0;
    background:none; border:none; box-shadow:none;
    padding:0 0 4px 16px;
  }
  .nav-dropdown-menu a{border-bottom:none; padding:12px 2px;}
}

.portal-main{min-height:100vh; padding:112px 32px 80px;}
.portal-wrap{max-width:1180px; margin:0 auto;}
.portal-wrap-narrow{max-width:460px; margin:0 auto;}

/* Auth screens (login, change password) */
.auth-card{
  background:var(--card); border:1px solid var(--card-border); border-radius:20px;
  padding:44px 40px; backdrop-filter:blur(10px);
}
.auth-card h1{font-size:28px; margin-bottom:8px;}
.auth-card .sub{color:var(--ink-2); font-size:14.5px; margin-bottom:28px;}
.auth-foot{margin-top:22px; text-align:center; font-size:14px; color:var(--ink-2);}
.auth-foot a{color:var(--accent-1);}
.auth-foot a:hover{text-decoration:underline;}

/* Forms */
.form-group{margin-bottom:20px;}
.form-row{display:grid; grid-template-columns:1fr 1fr; gap:16px;}
@media(max-width:640px){.form-row{grid-template-columns:1fr;}}
label{display:block; font-size:13.5px; color:var(--ink-1); margin-bottom:7px; font-weight:500;}
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=datetime-local], input[type=url], textarea, select{
  width:100%; padding:13px 16px; border-radius:12px;
  background:rgba(255,255,255,0.04); border:1px solid var(--card-border);
  color:var(--ink-0); font-family:'Inter', sans-serif; font-size:14.5px;
  transition:border-color .2s, background .2s;
}
input::placeholder, textarea::placeholder{color:var(--ink-2);}
input:focus, textarea:focus, select:focus{
  outline:none; border-color:var(--accent-1); background:rgba(255,255,255,0.06);
}
textarea{resize:vertical; min-height:100px;}
.form-hint{font-size:12.5px; color:var(--ink-2); margin-top:6px;}

/* Show/hide password toggle (login, signup, change password) — wraps a
 * single input[type=password] with an absolutely-positioned eye button;
 * see portal.js for the click handler that swaps the input's type and the
 * button's icon. Added 2026-08-26. */
.password-field{position:relative;}
.password-field input[type=password], .password-field input[type=text]{padding-right:44px;}
.password-toggle-btn{
  position:absolute; right:6px; top:50%; transform:translateY(-50%);
  width:32px; height:32px; display:flex; align-items:center; justify-content:center;
  background:none; border:none; padding:0; margin:0; cursor:pointer;
  color:var(--ink-2); border-radius:8px; transition:color .15s, background .15s;
}
.password-toggle-btn:hover{color:var(--ink-0); background:rgba(255,255,255,0.06);}
.password-toggle-btn svg{width:20px; height:20px;}
.form-error{
  background:rgba(224,81,122,0.12); border:1px solid rgba(224,81,122,0.35);
  color:#f3b7c6; padding:12px 16px; border-radius:12px; font-size:13.5px; margin-bottom:20px;
  display:none;
  /* Deliberately NOT var(--accent-*) — this is a semantic danger color
   * (see --danger in site.css), kept independent of the brand accent so
   * error states don't compete visually with normal branded UI. */
}
.form-error.visible{display:block;}
.form-success{
  background:rgba(120,200,160,0.12); border:1px solid rgba(120,200,160,0.35);
  color:#a8e0c0; padding:12px 16px; border-radius:12px; font-size:13.5px; margin-bottom:20px;
  display:none;
}
.form-success.visible{display:block;}
button.btn{font-family:inherit;}
.btn-block{width:100%;}

/* Dashboard */
.portal-page-head{display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:32px; flex-wrap:wrap;}
.portal-page-head h1{font-size:30px;}
.portal-page-head .sub{color:var(--ink-2); font-size:14.5px; margin-top:6px;}

.stat-grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:16px; margin-bottom:36px;}
.stat-card{background:var(--card); border:1px solid var(--card-border); border-radius:16px; padding:22px;}
.stat-card .n{font-family:'Fraunces', serif; font-size:28px; background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;}
.stat-card .l{font-size:13px; color:var(--ink-2); margin-top:4px;}

.portal-card{background:var(--card); border:1px solid var(--card-border); border-radius:18px; padding:28px; margin-bottom:24px;}
.portal-card h2{font-size:19px; margin-bottom:18px;}

.card-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:18px;}
.entity-card{
  background:rgba(255,255,255,0.03); border:1px solid var(--card-border); border-radius:14px; padding:20px;
  transition:border-color .2s, transform .2s;
}
.entity-card:hover{border-color:rgba(94,200,216,0.4); transform:translateY(-2px);}
.entity-card .title{font-family:'Fraunces', serif; font-size:17px; margin-bottom:4px;}
.entity-card .meta{font-size:13px; color:var(--ink-2); margin-bottom:10px;}
.entity-card a{color:var(--accent-1); font-size:13.5px; font-weight:600;}

/* Secondary line under a member's screen name (their profile's display
 * name, e.g. "Christine & Jim") — screen names are the primary identity
 * shown to other members, this is just supporting context underneath. */
.card-subtitle{font-size:12.5px; color:var(--ink-2); margin:0 0 6px;}
.entity-card .card-subtitle{margin-bottom:8px;}

.pill{
  display:inline-flex; align-items:center; padding:4px 12px; border-radius:999px;
  font-size:11.5px; font-weight:600; letter-spacing:0.03em; text-transform:uppercase;
  white-space:nowrap;
}
.pill-pending{background:rgba(94,200,216,0.16); color:var(--accent-1);}
.pill-active{background:rgba(120,200,160,0.16); color:#a8e0c0;}
.pill-draft{background:rgba(255,255,255,0.08); color:var(--ink-1);}
/* rgba(224,81,122,*) below = var(--danger) from site.css, at pill alpha — CSS custom
 * properties can't be split into RGB components for rgba() without color-mix(), so this
 * stays a literal matching that token rather than referencing it directly. */
.pill-suspended, .pill-cancelled{background:rgba(224,81,122,0.16); color:#f3b7c6;}
/* Banned is deliberately a bolder/more saturated version of the same red
 * as suspended — same "bad standing" family, but reads as more severe/
 * permanent, matching escalation from suspended to banned. */
.pill-banned{background:rgba(224,81,122,0.55); color:#ffffff;}
.pill-published{background:rgba(120,200,160,0.16); color:#a8e0c0;}
.pill-closed, .pill-paused, .pill-sold_out{background:rgba(255,255,255,0.08); color:var(--ink-1);}

table.portal-table{width:100%; border-collapse:collapse; font-size:14px;}
table.portal-table th{
  text-align:left; padding:10px 14px; color:var(--ink-2); font-weight:500; font-size:12.5px;
  text-transform:uppercase; letter-spacing:0.03em; border-bottom:1px solid var(--card-border);
}
table.portal-table td{padding:14px; border-bottom:1px solid rgba(255,255,255,0.05);}
table.portal-table tr:last-child td{border-bottom:none;}

table.portal-table .location-cell{white-space:nowrap; font-size:13.5px;}
table.portal-table tr.row-clickable{cursor:pointer;}
table.portal-table tr.row-clickable:hover td{background:rgba(255,255,255,0.035);}

/* Collapsible portal-card sections (profile_review.html's Interests and
 * Your Albums cards) — see the fuller comment further down this file
 * near .members-grid for the "why" (added 2026-09-13, per Jamie). A
 * plain <details class="portal-card portal-collapsible"> with
 * <summary>Title</summary> as its first child; .portal-card's own
 * padding/background/border are untouched, this only restyles the
 * summary line itself and its open/close indicator. */
details.portal-collapsible > summary{
  list-style:none; cursor:pointer;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  font-family:'Fraunces', serif; font-size:19px; color:var(--ink-0);
  margin-bottom:18px;
}
details.portal-collapsible:not([open]) > summary{margin-bottom:0;}
details.portal-collapsible > summary::-webkit-details-marker{display:none;}
details.portal-collapsible > summary::marker{content:'';}
details.portal-collapsible > summary::after{
  content:'+'; font-size:22px; font-weight:300; color:var(--accent-1); flex-shrink:0;
  transition:transform .25s ease; line-height:1;
}
details.portal-collapsible[open] > summary::after{transform:rotate(45deg);}

/* "New row" flash (added 2026-09-10, per Jamie: dashboard tables should
 * catch up on their own instead of needing a manual reload). Applied
 * once, at render time, to any Waitlist/Invite/Feedback row whose id
 * wasn't present in the previous poll — see isNewRow/.row-flash-new
 * usage in admin_dashboard.html. Uses --accent-1, the same teal already
 * used for "new/pending" state elsewhere (.pill-pending above) rather
 * than --danger, which this design system reserves for actual
 * moderation urgency (see the .nav-dot comment above). Since these
 * tables fully re-render their tbody on every poll, only rows the JS
 * marks new ever carry this class — an unrelated poll never replays the
 * animation on rows that were already there. */
@keyframes rowFlashNew{
  from{background-color:rgba(94,200,216,0.28);}
  to{background-color:transparent;}
}
tr.row-flash-new{animation:rowFlashNew 2.4s ease-out;}

/* Invite Codes table (admin_dashboard.html) — Email became its own
 * column on 2026-09-10 for the invite-remind feature. Note and Email
 * each get a bounded width + ellipsis (the full value is still always
 * available via the cell's title tooltip) so one long note or address
 * doesn't blow out that row's height or wrap unevenly against its
 * neighbors — the same overflow:hidden/text-overflow:ellipsis
 * convention already used by .member-meta above for the same reason.
 * .invite-actions-cell replaces an inline nowrap style so Remind/Revoke
 * sit on one line with consistent spacing instead of butting together. */
.invite-note-cell, .invite-email-cell{
  display:inline-block; max-width:220px; white-space:nowrap; overflow:hidden;
  text-overflow:ellipsis; vertical-align:bottom;
}
.invite-actions-cell{white-space:nowrap; display:flex; gap:8px;}

/* Admin Members table (admin_members.html) identity + status cells.
 * Originally this table gave screen name, email, phone, account status,
 * and card verification each their own column — nine columns total once
 * Profile/Location/Joined/View were added, which is what forced pill
 * text to wrap mid-word once the Verification column was introduced.
 * The fix isn't a narrower font or a scrollbar, it's fewer columns:
 * .member-cell stacks screen name/email/phone (they're all "who is
 * this") and .status-cell stacks the account-status and verification
 * pills (both "what state is this account in") so each logical group
 * reads as one dense cell instead of spreading across the row. */
.member-cell{display:flex; flex-direction:column; gap:2px; max-width:230px;}
.member-name{font-weight:600; color:var(--ink-0); font-size:14.5px;}
.member-meta{font-size:12.5px; color:var(--ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.status-cell{display:flex; flex-direction:column; align-items:flex-start; gap:6px;}

/* Defensive fallback only — with the column count above, a normal admin
 * viewport (laptop screen and up) shouldn't ever need this. Kept as a
 * safety net for an unusually narrow window rather than the primary fix. */
.table-scroll{overflow-x:auto;}

.empty-state{color:var(--ink-2); font-size:14.5px; padding:32px 0; text-align:center;}

.modal-backdrop{
  position:fixed; inset:0; background:rgba(10,7,13,0.7); backdrop-filter:blur(4px);
  display:none; align-items:center; justify-content:center; z-index:200; padding:24px;
}
.modal-backdrop.visible{display:flex;}
.modal{background:var(--bg-1); border:1px solid var(--card-border); border-radius:18px; padding:32px; max-width:480px; width:100%; max-height:86vh; overflow-y:auto;}
.modal h3{font-size:19px; margin-bottom:20px;}
.modal-close{float:right; background:none; border:none; color:var(--ink-2); cursor:pointer; font-size:18px;}

/* ============================================================
 * Profile setup flow (signup → type picker → create → photo →
 * review). Built for the first member-facing base — see
 * profile_type.html / profile_create.html / profile_photo.html /
 * profile_review.html.
 * ============================================================ */

/* Profile-type picker */
.type-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:16px;}
.type-card{
  display:block; background:var(--card); border:1px solid var(--card-border); border-radius:16px;
  padding:24px; transition:border-color .2s, transform .2s;
}
.type-card:hover{border-color:rgba(94,200,216,0.4); transform:translateY(-2px);}
.type-card-label{font-family:'Fraunces', serif; font-size:18px; margin-bottom:8px;}
.type-card-desc{color:var(--ink-2); font-size:13.5px; line-height:1.5;}

/* Member blocks (profile_create.html) — side by side rather than stacked.
 * auto-fit does the right thing for every profile type from one rule: 1
 * across on a narrow screen or a single profile, 2 across for couples,
 * wraps further for group/poly as more people are added. */
.members-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(320px, 1fr)); gap:18px;
}
.members-grid .member-block{margin-bottom:0;}

/* Each member card is its own container-query context, so the two
 * fields inside a form-row collapse to one column based on the CARD's
 * own rendered width — not the viewport's — once two or three of these
 * are actually squeezed side by side. */
.members-grid .member-block{container-type:inline-size;}
@container (max-width:420px){
  .member-block .form-row{grid-template-columns:1fr;}
}

.member-block{
  background:rgba(255,255,255,0.025); border:1px solid var(--card-border); border-radius:14px;
  padding:22px; margin-bottom:18px;
}
.member-block:last-child{margin-bottom:0;}
.member-block .form-group{margin-bottom:16px;}
.member-block select[multiple]{padding:8px;}
.member-block-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:16px;}
.member-block-head h3{font-family:'Fraunces', serif; font-size:16px; font-weight:500;}
.btn-remove-member{
  background:none; border:none; color:var(--ink-2); font-size:13px; cursor:pointer; font-family:inherit;
}
.btn-remove-member:hover{color:var(--danger);}
.static-value{
  padding:13px 16px; border-radius:12px; background:rgba(255,255,255,0.03);
  border:1px solid var(--card-border); color:var(--ink-1); font-size:14.5px;
}

/* Visibility controls — a select next to a field, always with the same
 * compact label-above-control shape as a normal form-group. */
.visibility-inline select{max-width:220px;}
.visibility-inline label{color:var(--ink-2); font-size:12.5px;}

.private-fields{
  margin-top:18px; padding-top:18px; border-top:1px dashed var(--card-border);
}
.private-fields-label{font-size:12.5px; color:var(--ink-2); margin-bottom:14px;}

/* "Looking for" preference tags */
.pref-grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:12px;}
.pref-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:rgba(255,255,255,0.025); border:1px solid var(--card-border); border-radius:12px;
  padding:12px 14px;
}
.pref-row .pref-visibility{width:auto; padding:6px 10px; font-size:12.5px; border-radius:8px;}
.checkbox-label{
  display:flex; align-items:center; gap:8px; font-size:14px; color:var(--ink-0);
  font-weight:400; margin-bottom:0; cursor:pointer;
}
.checkbox-label input[type=checkbox]{width:16px; height:16px; accent-color:var(--accent-1);}

/* Photo upload (profile_photo.html) */
.photo-dropzone{
  border:2px dashed var(--card-border); border-radius:16px; padding:32px; text-align:center;
  cursor:pointer; transition:border-color .2s, background .2s;
}
.photo-dropzone:hover{border-color:var(--accent-1); background:rgba(255,255,255,0.03);}
.photo-dropzone img{width:160px; height:160px; object-fit:cover; border-radius:14px; margin:0 auto;}
.photo-dropzone p{color:var(--ink-1); font-size:14.5px; margin-bottom:4px;}

/* Review page (profile_review.html) */
.review-field-list{display:flex; flex-direction:column; gap:8px;}
.review-field-row{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:14px;
  padding:6px 0; border-bottom:1px solid rgba(255,255,255,0.04);
}
.review-field-row:last-child{border-bottom:none;}
.review-field-label{color:var(--ink-2); min-width:140px; font-size:13px;}
.review-field-value{color:var(--ink-0); flex:1;}

/* A .review-field-row that mixes a status/verification .pill with an
 * inline edit control (admin_member_detail.html's Status/Verification
 * rows — see renderStatusControl/renderVerificationControl, 2026-08-24)
 * sits the <select>/<button> as flex items directly in the row rather
 * than a plain .review-field-value: that class's flex:1 would stretch a
 * <select> or <button> to fill the remaining row width, which reads as
 * an odd, oversized control next to a small pill. Capped to a sane
 * content-driven width instead, so the pill, dropdown, and button sit
 * together at a natural size right after the label. */
.review-field-row select, .review-field-row .btn-small{width:auto; flex:none;}
.review-field-row select{min-width:130px;}

/* People, read-only (profile_review.html + profile_view.html) — reuses
 * .members-grid from the create-form layout above so a couple's two
 * people sit side by side instead of stacked, the same auto-fit rule
 * handling singles/couples/groups from one place. These pages render
 * each person as an .entity-card (not .member-block, which is the
 * editable-form variant), so this adds the grid-child + compact-density
 * overrides .entity-card needs specifically inside this context, without
 * touching .entity-card's other use on the dashboard/browse cards. */
.members-grid.members-view{grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:14px;}
.members-grid .entity-card{margin-bottom:0;}
.members-grid .entity-card{padding:16px 18px;}
.members-grid .review-field-row{
  padding:5px 8px; margin:0 -8px; font-size:13.5px; border-radius:6px; border-bottom:none;
}
.members-grid .review-field-row:nth-child(even){background:rgba(255,255,255,0.035);}
.members-grid .review-field-label{width:112px; flex:0 0 112px; font-size:12.5px; color:var(--ink-1); font-weight:600;}

/* ============================================================
 * Browse + connection request/approval (browse.html,
 * profile_view.html, connections.html).
 * ============================================================ */

.btn-small{padding:8px 16px; font-size:13px;}

/* Browse cards reuse .card-grid/.entity-card from the dashboard styles
 * above — this just adds the bits specific to a clickable browse card. */
.browse-card{cursor:pointer;}
.browse-card-action{margin-top:12px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;}

/* Profile-type border colors, so the type reads at a glance while
 * scanning the grid: purple for couples, blue for single males, pink
 * for single females, creamy orange (not a construction-cone orange —
 * kept soft/muted to match the rest of the palette) for group/poly.
 * 2px (1px thicker than .entity-card's plain 1px border) plus a soft
 * glass-like glow underneath in the same hue. */
.browse-card-purple{border-width:2px; border-color:#9b6dd6; box-shadow:0 10px 26px -10px rgba(155,109,214,0.45);}
.browse-card-blue{border-width:2px; border-color:#5e9cd8; box-shadow:0 10px 26px -10px rgba(94,156,216,0.45);}
.browse-card-pink{border-width:2px; border-color:#e07bb0; box-shadow:0 10px 26px -10px rgba(224,123,176,0.45);}
.browse-card-orange{border-width:2px; border-color:#dda15e; box-shadow:0 10px 26px -10px rgba(221,161,94,0.45);}
.browse-card-purple:hover{border-color:#b28ce6; box-shadow:0 12px 30px -8px rgba(155,109,214,0.55);}
.browse-card-blue:hover{border-color:#7db0e2; box-shadow:0 12px 30px -8px rgba(94,156,216,0.55);}
.browse-card-pink:hover{border-color:#e895c0; box-shadow:0 12px 30px -8px rgba(224,123,176,0.55);}
.browse-card-orange:hover{border-color:#e6b478; box-shadow:0 12px 30px -8px rgba(221,161,94,0.55);}

/* Seeking-type icons on the Browse card (2026-09-07, at Jamie's request)
 * — one small person glyph per person implied by a seeking type (1 for
 * singles, 2 for couples, 3 for group), colored blue/pink/orange the
 * same as the card border colors above. .seeking-icon-group holds one
 * type's glyphs slightly overlapped (a "standing together" look); when a
 * profile has more than one seeking type selected, .seeking-icons-row
 * spaces the separate groups apart. See browse.html's
 * SEEKING_TYPE_ICONS/personIcon. */
.seeking-icons-row{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:2px;}
.seeking-icon-group{display:inline-flex; align-items:center;}
.seeking-icon-group svg{margin-left:-3px; display:block;}
.seeking-icon-group svg:first-child{margin-left:0;}

/* Fake/placeholder ad cards in Browse (beta only) — see browse.html's
 * FAKE_AD_TEMPLATES doc comment for context. Deliberately styled to
 * read as obviously NOT a real profile: dashed border instead of a
 * solid type-accent color, no photo (a striped placeholder block
 * instead), no Connect/Block actions, and an explicit badge. Remove
 * alongside the JS once a real ad system replaces this. */
.ad-card{
  border:1.5px dashed rgba(255,255,255,0.22);
  background:rgba(255,255,255,0.015);
  cursor:default;
}
.ad-card-badge{
  display:inline-flex; align-items:center; padding:4px 10px; border-radius:999px;
  font-size:10.5px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase;
  background:rgba(255,255,255,0.08); color:var(--ink-2); margin-bottom:12px;
}
.ad-card-icon{
  width:100%; height:160px; border-radius:10px; margin-bottom:14px;
  border:1px dashed rgba(255,255,255,0.18);
  background:repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 10px, rgba(255,255,255,0.045) 10px 20px);
  display:flex; align-items:center; justify-content:center;
  color:var(--ink-2); font-size:13px; font-weight:600; letter-spacing:0.05em;
}
.ad-card .meta{margin-bottom:0;}

/* Browse pagination bar (25 profiles/page — see handlers.ListProfiles) */
.browse-pagination{display:flex; align-items:center; justify-content:center; gap:18px; margin-top:32px;}
.browse-pagination .btn:disabled{opacity:0.4; cursor:default; transform:none;}
.browse-pagination .sub{white-space:nowrap;}

/* ============================================================
 * Browse search box (added 2026-09-07, Jamie: search by ZIP or
 * city/state instead of paging through every profile). Wrapped in the
 * same .portal-card the rest of the site uses for a bordered content
 * block; .search-row lays ZIP / "or" / City / State / buttons out in one
 * line on desktop, collapsing to a single column on narrow screens same
 * as .form-row does elsewhere. .form-group inside it reuses the site's
 * standard label+input styling, so ZIP/City/State look identical to any
 * other form field. */
.search-card{padding:22px 28px; margin-bottom:22px;}
.search-row{display:grid; grid-template-columns:110px auto 1fr auto; gap:14px; align-items:end;}
.search-row .form-group{margin-bottom:0;}
.search-or{display:flex; align-items:center; justify-content:center; padding-bottom:12px; color:var(--ink-2); font-size:13px;}
.search-actions{display:flex; gap:10px; padding-bottom:1px;}
@media(max-width:900px){
  .search-row{grid-template-columns:1fr 1fr;}
  .search-or{display:none;}
  .search-actions{grid-column:1 / -1;}
}
@media(max-width:640px){
  .search-row{grid-template-columns:1fr;}
}
#search-summary a{color:var(--accent-1);}

/* Location typeahead dropdown (added 2026-09-07, alongside the Search
 * box's City-name suggestion list) — same dark card/border/shadow
 * language as .nav-dropdown-menu above, so it reads as part of the same
 * design system rather than a bolted-on autocomplete widget.
 *
 * .city-field-group and .zip-field-group (added 2026-09-16, extended
 * 2026-09-17) are the same positioning role as .search-location-group
 * below, just for profile_create.html's own City and ZIP field
 * typeaheads — kept as separate, clearly-named classes rather than
 * reusing .search-location-group on a non-search field.
 *
 * .search-zip-group (added 2026-09-17) gives Browse's own ZIP field the
 * same dropdown once ZIP got its own typeahead there too (Jamie: "Entering
 * a zipcode should also start to give type ahead city/state combinations
 * ... less of a disjointed operation") — mirrors .search-location-group
 * right next to it in the same search row. */
.search-location-group, .search-zip-group, .city-field-group, .zip-field-group{position:relative;}
.location-suggestions{
  position:absolute; top:calc(100% + 6px); left:0; right:0; z-index:30;
  background:var(--bg-1); border:1px solid var(--card-border); border-radius:12px;
  padding:6px; max-height:260px; overflow-y:auto;
  box-shadow:0 20px 50px rgba(0,0,0,0.5);
}
.location-suggestions .suggestion{
  padding:9px 12px; border-radius:8px; font-size:14px; color:var(--ink-1);
  cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
/* Browse's ZIP column is a fixed 110px (see .search-row above) — plenty
 * for the input itself, but .location-suggestions defaults to exactly its
 * field's width (left:0; right:0), so every "City, ST 12345" suggestion
 * was getting truncated to "Beckley, ..." the moment ZIP got its own
 * typeahead (Jamie, 2026-09-17: "this just looks like shit on a
 * computer... It cuts off the suggestions"). Desktop-only for now — the
 * 110px column only exists above the 900px breakpoint where .search-row
 * collapses to a wider grid; mobile gets its own pass separately. Freed
 * from right:0 so it can overflow past the narrow input rather than being
 * squeezed to match it. */
@media(min-width:901px){
  .search-zip-group .location-suggestions{
    left:0; right:auto; width:280px; max-width:calc(100vw - 40px);
  }
}
.location-suggestions .suggestion:hover, .location-suggestions .suggestion.active{
  background:rgba(255,255,255,0.06); color:var(--ink-0);
}
.location-suggestions .empty{padding:9px 12px; font-size:13px; color:var(--ink-2);}

/* ============================================================
 * "Online now" indicator (browse.html card + profile_view.html header).
 * Uses Sway's own accent teal (--accent-1) rather than a generic status
 * green — it already reads as "live/active" while staying on-brand, so
 * the indicator feels like part of the design system instead of a
 * bolted-on SaaS presence dot. See handlers/presence.go for how "online"
 * is actually determined server-side (nothing here polls on its own).
 * ============================================================ */

/* Wraps a browse card's photo (or its no-photo placeholder) so the dot has
 * something to position against — same box either way. */
.card-photo-wrap{position:relative; margin-bottom:14px;}
.card-photo-wrap > img, .card-photo-wrap > div{margin-bottom:0;}

.online-dot{
  position:absolute; bottom:8px; right:8px; width:14px; height:14px; border-radius:50%;
  background:var(--accent-1); border:2.5px solid var(--bg-0);
  animation:online-pulse 2.4s ease-in-out infinite;
}
@keyframes online-pulse{
  0%{box-shadow:0 0 0 0 rgba(94,200,216,0.55);}
  70%{box-shadow:0 0 0 8px rgba(94,200,216,0);}
  100%{box-shadow:0 0 0 0 rgba(94,200,216,0);}
}

/* Profile-page badge — reuses .pill's shape/sizing, adds its own color +
 * a small pulsing dot of its own (bigger context than the card corner
 * dot, so it gets its own label, not just a bare dot). */
.pill-online{background:rgba(94,200,216,0.16); color:var(--accent-1); gap:6px;}
.pill-online .dot{
  width:7px; height:7px; border-radius:50%; background:var(--accent-1);
  animation:online-pulse-small 2.4s ease-in-out infinite;
}
@keyframes online-pulse-small{
  0%{box-shadow:0 0 0 0 rgba(94,200,216,0.6);}
  70%{box-shadow:0 0 0 5px rgba(94,200,216,0);}
  100%{box-shadow:0 0 0 0 rgba(94,200,216,0);}
}
.portal-page-head h1 .pill-online{margin-left:12px; vertical-align:middle;}

/* Connection request rows (incoming/outgoing/connected lists) */
.connection-row{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  padding:14px 0; border-bottom:1px solid rgba(255,255,255,0.05);
}
.connection-row:last-child{border-bottom:none;}
.connection-row-actions{display:flex; gap:8px; flex-shrink:0;}

/* Shared date-of-birth widget (js/dob-widget.js) — originally built
 * 2026-08-23 for the signup page only (a plain native <input type="date">
 * was never actually styled by the input[type=...] selector list above,
 * so it rendered as a tiny unstyled browser-default control on this
 * page's dark theme — the "can't see the damn thing" Jamie flagged), then
 * promoted here 2026-08-24 when profile_create.html needed the same
 * widget for every person in a profile (see that template's per-member
 * date-of-birth field). Supports BOTH typing (MM/DD/YYYY, auto-formatted
 * as digits are entered) and picking from a calendar dropdown.
 *
 * Class-based rather than id-based (unlike its original signup-only
 * version) specifically so more than one instance can exist on the same
 * page at once — profile_create.html renders one per person in a couple
 * or group profile. */
.dob-widget{position:relative;}
.dob-display{
  font-size:19px; letter-spacing:0.5px; padding:14px 52px 14px 16px;
  background:var(--grad-soft); font-variant-numeric:tabular-nums;
}
.dob-display:focus{background:rgba(255,255,255,0.07);}
.dob-display:disabled{opacity:0.6; cursor:not-allowed;}
.dob-calendar-toggle{
  position:absolute; right:6px; top:6px; bottom:6px; width:42px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:none; border-radius:9px; cursor:pointer;
  color:var(--accent-1); transition:background .2s, color .2s;
}
.dob-calendar-toggle:hover, .dob-calendar-toggle:focus-visible{
  background:rgba(94,200,216,0.16); color:var(--ink-0); outline:none;
}
.dob-calendar-toggle:disabled{opacity:0.4; cursor:not-allowed; pointer-events:none;}
.dob-calendar-toggle svg{width:22px; height:22px;}
.dob-calendar-panel{
  position:absolute; top:calc(100% + 10px); left:0; right:0; z-index:60;
  background:var(--bg-1); border:1px solid var(--card-border);
  border-radius:16px; padding:18px; box-shadow:0 20px 50px rgba(0,0,0,0.5);
}
.dob-calendar-panel[hidden]{display:none;}
.dob-calendar-header{display:flex; align-items:center; gap:8px; margin-bottom:14px;}
.dob-calendar-header select{flex:1; padding:10px 12px; font-size:15px; font-weight:600;}
.dob-nav-btn{
  background:rgba(255,255,255,0.05); border:1px solid var(--card-border);
  color:var(--ink-0); width:36px; height:36px; border-radius:10px;
  font-size:18px; line-height:1; cursor:pointer; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s;
}
.dob-nav-btn:hover{background:rgba(255,255,255,0.1);}
.dob-calendar-weekdays, .dob-calendar-grid{
  display:grid; grid-template-columns:repeat(7, 1fr); gap:4px;
}
.dob-calendar-weekdays{margin-bottom:6px;}
.dob-calendar-weekdays span{
  text-align:center; font-size:11.5px; font-weight:600; color:var(--ink-2);
  text-transform:uppercase; letter-spacing:0.04em; padding:4px 0; display:block;
}
.dob-day{
  aspect-ratio:1; display:flex; align-items:center; justify-content:center;
  border-radius:10px; border:none; background:none; color:var(--ink-0);
  font-size:15px; cursor:pointer; transition:background .15s, color .15s;
}
.dob-day:hover{background:rgba(255,255,255,0.09);}
.dob-day:focus-visible{outline:2px solid var(--accent-1); outline-offset:-2px;}
.dob-day.is-empty{visibility:hidden; cursor:default;}
.dob-day.is-selected{background:var(--grad); color:#0a070d; font-weight:700;}
@media(max-width:480px){
  .dob-display{font-size:17px;}
  .dob-day{font-size:14px;}
}

/* profile_create.html only: the note shown in place of the DOB widget for
 * whichever member is marked "This is me" — that person's date of birth
 * comes from the account's own signup date instead (see
 * handlers.resolveMemberDatesOfBirth), so there's nothing for them to
 * enter here. Hidden by default; toggled per-block by profile_create.html's
 * script alongside the matching .dob-widget's own locked state. */
.dob-locked-note{
  display:none; align-items:center; gap:10px; padding:14px 16px;
  background:var(--grad-soft); border-radius:12px; font-size:14px; color:var(--ink-1);
}
.dob-locked-note.visible{display:flex;}

/* ============================================================
 * Feedback widget ("Report Feedback" button — added 2026-09-08).
 * A floating button on every member-facing page, opening a small
 * modal form (reuses .modal-backdrop/.modal above) that posts to
 * POST /v1/feedback. See
 * swaythiswayweb/templates/feedback_widget.html.
 * ============================================================ */
.feedback-fab{
  position:fixed; right:20px; bottom:20px; z-index:150;
  background:var(--grad); color:#0a070d; border:none; border-radius:999px;
  padding:12px 20px; font-size:14px; font-weight:700; cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,0.35); transition:transform .15s;
}
.feedback-fab:hover{transform:translateY(-2px);}
@media(max-width:480px){
  .feedback-fab{right:14px; bottom:14px; padding:10px 16px; font-size:13px;}
}
.feedback-success{color:var(--ink-1); font-size:14px; text-align:center; padding:12px 0;}

/* ============================================================
 * MOTD notice banner (admin-controlled site-wide notice — added
 * 2026-09-08). Sits just below the nav on every member-facing page;
 * see swaythiswayweb/templates/motd_banner.html and
 * handlers/api_motd.go.
 * ============================================================ */
.motd-banner{
  display:none; background:var(--grad-soft); color:var(--ink-0);
  padding:10px 24px; font-size:14px; text-align:center; border-bottom:1px solid var(--card-border);
  /* position:fixed, not static — .portal-header above is ALSO
     position:fixed (out of normal document flow), so a statically-
     positioned banner sitting right after </header> in the DOM would
     render at the very top of the page and end up hidden underneath the
     header rather than pushed below it. motd_banner.html's own script
     sets `top` to the header's actual measured height once the notice
     is shown. */
  position:fixed; left:0; right:0; z-index:99;
}
.motd-banner.visible{display:block;}
