@import url('/shared/brand.css');

@import url('/shared/polish.css');

/* PhotoOra — shared styles · Modern · Minimal · Fresh & Bright */

/* =====================================================================
   DESIGN TOKENS — single source of truth for the whole app.
   Everything below is the vocabulary components should reference instead
   of hardcoding values. Legacy names (--accent, --radius, --shadow…) are
   preserved so existing pages keep working; new/semantic tokens sit
   alongside them. Brand colors and fonts are defined in brand.css.
   ===================================================================== */
:root {
  /* --- brand palette (raw hues) --- */
  --bg: #f6f7fb;
  --bg-tint: var(--brand-soft);
  --card: #ffffff;
  --ink: var(--brand-ink);
  --muted: var(--brand-muted);
  --accent: var(--brand-primary);          /* event-theme compatible alias */
  --accent-2: var(--brand-primary);
  --accent-ink: #ffffff;
  --violet-mid: var(--brand-primary);
  --wordmark-ink: var(--brand-ink);
  --wordmark-accent: var(--brand-logo-purple);
  --wordmark-size: 28px;
  --wordmark-icon-size: 29px;
  --brand-navy: #24316d;      /* wordmark ink */
  --grad: var(--brand-fill);
  --line: #ebedf3;
  --ok: #10b981;
  --warn: #e0556e;

  /* --- semantic aliases (reference roles, not hues) --- */
  --surface: var(--card);
  --surface-2: var(--bg-tint);
  --text: var(--ink);
  --text-muted: var(--muted);
  --border: var(--line);
  --brand: var(--accent);
  --brand-2: var(--accent-2);
  --success: var(--ok);
  --danger: var(--warn);
  --placeholder: #aeb2bd;
  --label-ink: #3a3c46;
  --ghost-border: var(--brand-border);
  --disabled-bg: #e7e7ef;
  --disabled-ink: #9a9aac;

  /* --- radius scale (collapses the 15 ad-hoc px values) --- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --radius: var(--r-lg);       /* legacy alias */
  --radius-sm: var(--r-md);    /* legacy alias */

  /* --- spacing scale --- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* --- elevation --- */
  --shadow-sm: 0 4px 14px rgba(28, 27, 71, 0.07);
  --shadow: 0 12px 34px rgba(28, 27, 71, 0.10);
  --shadow-lg: 0 24px 60px rgba(28, 27, 71, 0.16);
  --shadow-btn: 0 8px 20px color-mix(in srgb, var(--brand-primary) 28%, transparent);
  --shadow-btn-hover: 0 12px 26px color-mix(in srgb, var(--brand-primary) 34%, transparent);
  --ring: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 16%, transparent);

  /* --- z-index ladder (name the stacking order deliberately) --- */
  --z-base: 1;
  --z-menu: 50;
  --z-modal: 300;
  --z-toast: 2000;

  /* --- type: Jakarta for the interface and wordmark.
     Album/sign artwork keeps its own decorative type choices. --- */
  --fs-xs: 11px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-lg: 17px;
  --fs-xl: 22px;
  --fs-2xl: 26px;
  --fs-page-title: 40px;
}

@media (max-width: 640px) {
  :root { --fs-page-title: 32px; --wordmark-size: 24px; --wordmark-icon-size: 25px; }
}

* { box-sizing: border-box; }

/* Always reserve the vertical scrollbar's space so centered layouts don't jump
   sideways between a tall page (scrollbar present) and a short one (absent). */
html { background: var(--bg); scrollbar-gutter: stable; }
html, body { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(255, 93, 143, 0.10), transparent 60%),
    radial-gradient(800px 500px at -10% 0%, color-mix(in srgb, var(--brand-primary) 12%, transparent), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 600px; margin: 0 auto; padding: 28px 20px 60px; }

/* Shared footer: the same quiet divider and legal links on ordinary pages. */
body.footer-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.footer-page > .page-content { flex: 1 0 auto; min-width: 0; }
.site-legal-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; width: min(1028px, calc(100% - 48px)); margin: 24px auto 28px; padding: 20px 0 env(safe-area-inset-bottom, 0px); border-top: 1px solid var(--brand-border); color: var(--muted); font-size: 11px; line-height: 1.6; }
.site-legal-footer .footer-copy { margin: 0; font-size: inherit; color: inherit; }
.site-legal-footer nav, .footer-explore { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; }
.site-legal-footer a, .footer-explore a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; text-underline-offset: 3px; }
.site-legal-footer a:hover, .footer-explore a:hover { color: var(--brand-primary); text-decoration: underline; }
.site-legal-footer a:focus-visible, .footer-explore a:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 3px; border-radius: 3px; }
.site-foot { max-width: 1080px; margin: 0 auto; padding: 8px 26px 0; }
.footer-explore { justify-content: center; gap: 0 26px; color: var(--muted); font-size: 12px; }
.site-foot .site-legal-footer { width: 100%; margin-top: 10px; }
.lg-wrap .site-legal-footer { width: 100%; margin: 36px 0 0; }
.lg-wrap .site-legal-footer a { color: inherit; font-weight: 400; }
.lg-wrap .site-legal-footer a:hover { color: var(--brand-primary); }
@media (max-width: 640px) {
  .site-legal-footer { width: calc(100% - 32px); flex-direction: column; align-items: flex-start; gap: 3px; padding-top: 16px; margin-top: 20px; }
  .site-foot { padding-inline: 16px; }
  .footer-explore { gap: 0 20px; }
}
@media print { .site-legal-footer { display: none; } }

/* ---- brand / headings ---- */
.brand {
  font-family: var(--font-wordmark);
  font-weight: var(--wordmark-weight);
  font-size: var(--fs-xl);
  line-height: 1.3;
  letter-spacing: var(--wordmark-tracking);
  color: var(--wordmark-ink);
}
.brand .o { color: var(--wordmark-accent); background: none; -webkit-text-fill-color: currentColor; }
.brand .spk { display: inline-block; width: .5em; height: .5em; vertical-align: .34em; margin-left: 1px; color: var(--brand-2); }
.brandwrap { display: inline-flex; align-items: center; gap: 3px; text-decoration: none; }
.logomark { width: 26px; height: 26px; flex: none; }
/* Mockup wordmark proportions for public and host page headers. */
.photoora-header .brandwrap { gap: 5px; }
.photoora-header .brand {
  font-family: var(--font-wordmark);
  font-size: var(--wordmark-size);
  font-weight: var(--wordmark-weight);
  line-height: 1.3;
  letter-spacing: var(--wordmark-tracking);
  color: var(--wordmark-ink);
  white-space: nowrap;
}
.photoora-header .logomark { width: var(--wordmark-icon-size); height: var(--wordmark-icon-size); }
.site-nav-links { display: flex; align-items: center; gap: 26px; margin-right: 10px; padding-right: 26px; border-right: 1px solid var(--line); }
.site-nav-links a { color: var(--muted); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.site-nav-links a[aria-current="page"], .site-nav-links a:hover { color: var(--brand-primary); }
.site-nav-links a:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 5px; border-radius: 2px; }
.links:has(#nav-user[hidden]) .site-nav-links { border-right: 0; padding-right: 0; margin-right: 0; }
@media (max-width: 760px) { .site-nav-links { display: none; } }

h1 { font-size: 26px; line-height: var(--lh-heading); letter-spacing: var(--heading-tracking); margin: 8px 0 var(--space-title-copy); font-weight: var(--fw-heading); }
h2 { font-size: 17px; line-height: var(--lh-subheading); letter-spacing: var(--heading-tracking); margin: 20px 0 var(--space-title-copy); font-weight: var(--fw-heading); }
h3, h4 { font-weight: var(--fw-subheading); line-height: var(--lh-subheading); }
.muted { color: var(--muted); }
.center { text-align: center; }
.spacer { height: 16px; }

/* ---- cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--sp-6);
  transition: transform .18s ease, box-shadow .18s ease;
}

/* ---- buttons ---- */
button, .btn {
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent-ink);
  background: var(--brand-fill);
  border: 0;
  border-radius: var(--control-radius);
  padding: 10px 22px;
  cursor: pointer;
  width: 100%;
  box-shadow: var(--shadow-btn);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
button:hover, .btn:hover { background: var(--brand-fill-hover); transform: translateY(-1px); box-shadow: var(--shadow-btn-hover); }
button:active, .btn:active { transform: translateY(0); }
button:disabled, .btn:disabled { opacity: 1; cursor: default; box-shadow: none; transform: none; background: var(--disabled-bg); color: var(--disabled-ink); }
button:disabled:hover, .btn:disabled:hover { transform: none; box-shadow: none; background: var(--disabled-bg); }

.btn-ghost {
  background: var(--card);
  color: var(--accent);
  border: 1.5px solid var(--ghost-border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--bg-tint); box-shadow: var(--shadow-sm); }

/* ---- inputs ---- */
input, textarea, select {
  font: inherit;
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
label { font-size: var(--fs-sm); font-weight: 700; letter-spacing: -0.01em; display: block; margin: var(--sp-4) 0 7px; color: var(--label-ink); }

/* ---- layout helpers ---- */
.row { display: flex; gap: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* ---- gallery tiles ---- */
.tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-tint);
  box-shadow: var(--shadow-sm);
}
.tile img, .tile video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.tile:hover img, .tile:hover video { transform: scale(1.06); }
.tile .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 10px 9px;
  font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62));
}

/* ---- bits ---- */
.status { font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.status:last-child { border-bottom: 0; }
.pill {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em;
  padding: 4px 11px; border-radius: var(--r-pill);
  background: var(--bg-tint); color: var(--accent);
  text-transform: uppercase;
}
.err { color: var(--warn); font-size: 14px; font-weight: 600; }

/* ---- account menu (homepage, pricing and host pages) ---- */
.acct { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 16px 7px 7px; cursor: pointer; box-shadow: var(--shadow-sm); width: auto; color: var(--ink); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.acct:hover { background: var(--bg-tint); box-shadow: var(--shadow-sm); transform: none; }
.acct .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-fill); color: var(--brand-on-primary); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.acct .chev { display: block; width: 14px; height: 14px; flex: none; color: var(--muted); transition: transform .18s ease; }
.acct[aria-expanded="true"] .chev { transform: rotate(180deg); }
@media (max-width: 560px) {
  .photoora-header #acct-name { display: none; }
  .photoora-header .acct { padding: 3px 9px 3px 3px; gap: 5px; }
  .photoora-header .acct .avatar { width: 30px; height: 30px; font-size: 13px; }
}
.acct:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.acctmenu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); padding: var(--sp-2); width: 264px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 96px); overflow-y: auto; overscroll-behavior: contain; z-index: var(--z-menu); border: 1px solid var(--brand-border); border-radius: var(--r-lg); box-shadow: 0 22px 60px color-mix(in srgb, var(--brand-primary) 22%, transparent), 0 8px 22px rgba(255, 93, 143, .12), 0 2px 8px rgba(36, 49, 109, .08); }
.acctmenu[hidden] { display: none; }
.acct-head { display: flex; align-items: center; gap: 11px; padding: 8px 10px 12px; margin: 2px 2px 6px; position: relative; background: var(--card) radial-gradient(150px 110px at 100% 0%, rgba(255, 93, 143, .13), color-mix(in srgb, var(--brand-primary) 9%, transparent) 45%, transparent 75%); border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); }
.acct-head .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-fill); color: var(--brand-on-primary); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex: none; }
.acct-id { min-width: 0; }
.acct-nm { font-weight: 800; font-size: var(--fs-md); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-email { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-section { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px 4px; }
.acct-item { min-height: 44px; display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: var(--fs-md); font-weight: 600; background: transparent; border: 0; cursor: pointer; box-shadow: none; }
.acct-item svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.acct-item:hover { background: var(--bg-tint); box-shadow: none; transform: none; }
.acct-item.danger { color: var(--danger); }
.acct-item.danger:hover { background: rgba(224,85,110,.08); }
.acct-item.danger svg { color: var(--danger); }
.acct-current { background: var(--brand-soft); }
.acct-current svg { color: var(--accent); }
.acct-current:hover { background: var(--brand-soft); }
.acct-boxitem { font-size: 13px !important; }
.acct-divider { height: 1px; background: var(--line); margin: 6px 4px; }
#acct-boxes { max-height: 218px; overflow-y: auto; overscroll-behavior: contain; }
.evico { width: 27px; height: 27px; flex: none; border-radius: var(--r-sm); background: var(--brand-tint); border: 1px solid var(--brand-border); color: #a06bf5; display: flex; align-items: center; justify-content: center; }
.evico svg { width: 14px !important; height: 14px !important; color: #a06bf5 !important; }
@media (max-width: 480px) { .acct-item { padding: 8px 10px; font-size: 13.5px; } }

.acctmenu .acct-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .acct .chev { transition: none; } }

/* subtle entrance for cards */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card { animation: rise .35s ease both; }

/* attention pulse for the confirm-your-email banner (fires when someone tries
   to create an event before confirming) */
@keyframes vbPulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-primary) 50%, transparent); }
  70% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--brand-primary) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand-primary) 0%, transparent); }
}
.vb-pulse { animation: vbPulse .8s ease-out 3; }

/* Header rhythm shared by public pages, host screens and legal documents. */
.photoora-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; }
.photoora-header .links { display: flex; align-items: center; gap: 10px; }
.photoora-header .site-nav-links a { min-height: 44px; display: inline-flex; align-items: center; }
.photoora-header .header-login { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 13px; text-decoration: none; white-space: nowrap; }
@media (max-width: 980px) { .photoora-header .nav-cta { display: none; } }
