/* Shared vocabulary, copied from ReziDay's components.css (the classes the game wears:
   .btn*, .card, .chip, .tag-pill*, .field/.input, .seg, .switch, .avatar*). Game-only
   additions follow at the end (choice cards .cc, the clay lip, the score table). */
/* Shared UI components: buttons, cards, chips, inputs, toggles, progress, avatars. */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn--dark { background: var(--ink); color: #FFFFFF; }
.btn--dark:hover { background: var(--navy-2); color: #FFFFFF; }

.btn--teal { background: var(--teal); color: #FFFFFF; }
.btn--teal:hover { background: var(--teal-hover); color: #FFFFFF; }

.btn--outline { background: var(--card); border: 1px solid var(--border-2); color: var(--ink); }
.btn--outline:hover { background: var(--surface-3); color: var(--ink); }

.btn--cream { background: var(--canvas); color: var(--ink); }
.btn--cream:hover { background: #FFFFFF; color: var(--ink); }

.btn--ghost { color: var(--ink); }
.btn--ghost:hover { background: var(--surface-3); color: var(--ink); }

.btn--lg { height: 52px; padding: 0 30px; font-size: 16px; }
.btn--xl { height: 54px; padding: 0 34px; font-size: 16.5px; }
.btn--sm { height: 34px; padding: 0 15px; font-size: 13px; }

/* ---- Cards ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}

.card--lg { border-radius: var(--r-lg); }

/* ---- Chips / badges ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
}

.chip--tint { background: var(--teal-tint); border-color: var(--teal-border); color: var(--teal-ink); }

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
}

.tag-pill--teal { background: var(--teal-tint); color: var(--teal-ink); }
.tag-pill--coral { background: #FCEAE4; color: var(--trap); }
.tag-pill--gold { background: #F9E9C8; color: var(--warn-ink); }
.tag-pill--navy { background: var(--ink); color: #FFFFFF; }

/* ---- Form fields ---- */
.field { display: flex; flex-direction: column; gap: 6px; }

.field-label { font-size: 12.5px; font-weight: 600; color: var(--slate); }

.input, .textarea {
  border-radius: var(--r-xs);
  border: 1px solid var(--border-2);
  padding: 0 13px;
  font-size: 14px;
  background: var(--card);
  outline: none;
  width: 100%;
}

.input { height: 42px; }

.textarea { min-height: 120px; resize: vertical; padding: 11px 13px; line-height: 1.55; }

.input:focus, .textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(14, 124, 123, .12);
  outline: none;
}

/* ---- Segmented control ---- */
.seg {
  display: inline-flex;
  background: var(--sand);
  border-radius: var(--r-xs);
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.seg-btn:hover { color: var(--ink); }

.seg-btn.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(28, 27, 25, .08); }

/* ---- Toggle switch ---- */
.switch { position: relative; display: inline-flex; width: 40px; height: 23px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch-track {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: var(--r-pill);
  transition: background .15s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 2.5px; left: 2.5px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(28, 27, 25, .18);
  transition: transform .15s ease;
}
.switch input:checked + .switch-track { background: var(--teal); }
.switch input:checked + .switch-track::after { transform: translateX(17px); }

/* ---- Progress bars ---- */
.pbar { height: 4px; background: var(--cream-line); border-radius: var(--r-pill); overflow: hidden; }
.pbar-fill { height: 100%; background: var(--teal); border-radius: var(--r-pill); }

/* ---- Avatars ---- */
.avatar {
  width: 34px; height: 34px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--canvas);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar svg { width: 100%; height: 100%; display: block; }

.avatar--initials {
  background: var(--ink);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-serif); font-variant-numeric: tabular-nums;
}

.avatar-stack { display: flex; }
.avatar-stack > * + * { margin-left: -9px; }

/* ---- Game additions (from the Remi canvas) ---- */

/* The board-game border worn by every interactive control: 2px + a 4px bottom lip,
   press = 1px down. CTAs in teal wear the darker teal lip. */
.lip { border-bottom: 4px solid var(--teal-hover) !important; }
.lip-dark { border-bottom: 4px solid #000 !important; }
.btn--board { border: 2px solid var(--border-2); border-bottom-width: 4px; background: var(--card); color: var(--ink); }
.btn--board:hover { background: var(--surface-3); color: var(--ink); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled {
  background: var(--sand) !important; color: var(--muted-2) !important;
  border-color: var(--border) !important; border-bottom: 4px solid var(--border) !important;
  cursor: default; transform: none;
}
.btn--teal.btn--board { border-color: var(--teal); border-bottom-color: var(--teal-hover); }

/* Choice cards (locuri 2/3/4, runde 2/4/6): serif tabular figures on a board-game border. */
.cc {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 40px; padding: 0 14px;
  border-radius: var(--r-sm);
  background: var(--card); border: 2px solid var(--border); border-bottom-width: 4px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  font-family: var(--font-serif); font-variant-numeric: tabular-nums;
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.cc:active { transform: translateY(1px); }
.cc.on, .cc[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-tint); color: var(--teal-ink); }
.cc:disabled { cursor: default; opacity: .6; }

.num { font-family: var(--font-serif); font-variant-numeric: tabular-nums; }

/* The score sheet: one column per player, figures right-aligned serif tabular, negatives
   in --error, joc dublu as its own ×2 row. */
.sc-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.sc-tbl th {
  font-size: 12px; font-weight: 600; color: var(--muted); text-align: right;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-3);
  white-space: nowrap;
}
.sc-tbl th:first-child { text-align: left; }
.sc-tbl td {
  padding: 10px 14px; border-bottom: 1px solid var(--divider); text-align: right;
  font-family: var(--font-serif); font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; color: var(--ink);
}
.sc-tbl td:first-child { text-align: left; font-family: var(--font-body); font-weight: 500; font-size: 13.5px; color: var(--body-c); }
.sc-tbl .neg { color: var(--error); }
.sc-tbl .tot td { background: var(--surface-3); font-size: 17px; border-top: 1px solid var(--border); }
.sc-tbl .mul td { color: var(--warn-ink); font-size: 13px; }
.sc-tbl th.you, .sc-tbl td.you { background: var(--teal-tint-2); }
@media (max-width: 480px) {
  .sc-tbl { font-size: 13px; }
  .sc-tbl th, .sc-tbl td { padding: 8px 8px; }
  .sc-tbl td { font-size: 14px; }
  .sc-tbl td:first-child { font-size: 12px; }
}

/* Toast: white pill, 1.4–2.4 s, bottom-centre (top-centre on phone landscape at the table) */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 130;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-pop); white-space: nowrap; max-width: calc(100vw - 32px);
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--err { color: var(--error); }

/* Modal + bottom sheet (one scrim recipe) */
.scrim {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 34, 48, .48); backdrop-filter: blur(4px); padding: 16px;
}
.scrim[hidden] { display: none; }
.modal {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop); width: 560px; max-width: 100%; max-height: calc(100dvh - 32px); overflow: auto;
  padding: 28px 32px 30px; display: flex; flex-direction: column; gap: 18px;
}
@media (max-width: 767px) {
  .scrim { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%; border-radius: 24px 24px 0 0; border: 0; box-shadow: var(--shadow-sheet);
    padding: 12px 22px calc(28px + env(safe-area-inset-bottom)); gap: 14px;
  }
  .modal::before { content: ""; width: 40px; height: 4px; border-radius: var(--r-pill); background: var(--border); align-self: center; }
}

/* ---- A player's own picture (partials/user_avatar.html): image, colour + initials, or the drawing ---- */
.uav { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
       overflow: hidden; flex: none; background: var(--surface); }
.uav--xl { width: 88px; height: 88px; }
.uav img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uav .avatar { width: 100%; height: 100%; }
.uav[data-kind="preset"] { background: var(--c); }
.uav-initials { color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.uav--xl .uav-initials { font-size: 30px; }
.who-avatar { display: inline-flex; border-radius: 50%; }
.who-avatar .uav { width: 34px; height: 34px; }
.who-avatar .uav-initials { font-size: 12px; }

/* ---- The site header (partials/site_header.html): lobby, profile, legal, contact ---- */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--canvas); border-bottom: 1px solid var(--border);
             padding-top: env(safe-area-inset-top); }
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-head { background: color-mix(in srgb, var(--canvas) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
@media (prefers-reduced-transparency: reduce) { .site-head { background: var(--canvas); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.site-head-inner { max-width: 1120px; margin: 0 auto; height: 64px; padding: 0 clamp(16px, 4vw, 32px);
                   display: flex; align-items: center; gap: 16px; }
.site-brand { text-decoration: none; flex: none; }
.site-brand .wordmark { font-size: 22px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav-form { margin: 0; display: flex; }
.site-nav-link { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--r-pill);
                 color: var(--slate); font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav-link:hover { background: var(--surface-3); color: var(--ink); }
.site-nav-link[aria-current="page"] { background: var(--teal-tint); color: var(--teal-ink); }
.site-nav-link:focus-visible { outline: 3px solid var(--teal); outline-offset: 1px; }
.site-nav-me { padding-left: 5px; }
.site-nav-me .uav { width: 30px; height: 30px; }
.site-nav-me .uav-initials { font-size: 12px; }
.site-nav-signup { color: var(--ink); margin-right: 8px; }
@media (max-width: 560px) {
  .site-nav-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .site-nav-link { padding: 0 10px; }
  .site-nav-me { padding: 0 6px; }
  .site-brand .wordmark { font-size: 19px; }
}
@media (max-width: 420px) { .site-nav-signup { display: none; } }

/* ---- The site footer (partials/site_footer.html) ---- */
.site-foot { border-top: 1px solid var(--border); background: var(--surface-2); }
.site-foot-inner { max-width: 1120px; margin: 0 auto; padding: 44px clamp(16px, 4vw, 32px) 28px;
                   display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-foot-brand p { margin: 12px 0 0; font-size: 14px; line-height: 1.6; max-width: 280px; }
.site-foot-col { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.site-foot-h { margin: 0 0 4px; font-family: var(--font-eyebrow); font-weight: 700; font-size: 11px; letter-spacing: .08em;
               text-transform: uppercase; color: var(--muted); }
.site-foot-col a { color: var(--ink-warm) !important; font-weight: 400 !important; text-decoration: none; overflow-wrap: anywhere; }
.site-foot-col a:hover { color: var(--teal) !important; }
.site-foot-copy { max-width: 1120px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 32px) calc(22px + env(safe-area-inset-bottom));
                  border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); box-sizing: border-box; }
@media (max-width: 760px) {
  .site-foot-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; padding-top: 34px; }
  .site-foot-brand { grid-column: 1 / -1; }
}
