/* CardCircle: online tables (Brief 11): the Play with friends panels, the room, the turn clock
   on a seat, quick reactions. Uses the panel-card and seg styles of the game page. */

.online-panel { gap: 14px; }
/* A panel taller than the window scrolls inside itself; nothing in it is squeezed to nothing (Brief 18). */
.panel-card > * { flex-shrink: 0; }
.online-panel label:not(.ol-switch) { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.online-panel form { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
.online-panel .input { width: 100%; text-align: center; font-size: 1.05rem; }
.ol-name { width: 100%; }
.ol-hint { margin: 6px 0 0; font-size: 0.82rem; color: var(--ink-3); line-height: 1.35; }
.ol-hint.bad { color: var(--lose); font-weight: 600; }
.ol-note { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 114, 114, 0.12); color: var(--ink); font-size: 0.92rem; }
.ol-error { margin: 0; color: var(--lose); font-weight: 600; font-size: 0.92rem; }
.ol-alt { margin: 0; color: var(--ink-3); font-size: 0.9rem; }
.linklike { appearance: none; border: 0; background: none; padding: 4px 2px; font: inherit; font-weight: 700; color: var(--gold-2); text-decoration: underline; cursor: pointer; }
.linklike:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; border-radius: 4px; }

/* Create / join tabs */
.ol-tabs { display: flex; width: 100%; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.ol-tab { flex: 1; min-height: 40px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.ol-tab[aria-selected='true'] { color: #2b1c04; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.ol-tab:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.ol-code { letter-spacing: 0.3em; text-transform: uppercase; font-weight: 800; font-size: 1.4rem !important; }

/* Settings */
.ol-settings { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.ol-seg span { min-width: 44px; min-height: 40px; padding: 0 12px; }
.ol-switch { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.ol-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ol-switch-ui { position: relative; flex: none; width: 46px; height: 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.2); transition: background 0.2s; }
.ol-switch-ui::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: translate 0.2s var(--ease); }
.ol-switch input:checked + .ol-switch-ui { background: var(--gold); border-color: transparent; }
.ol-switch input:checked + .ol-switch-ui::after { translate: 20px 0; background: #2b1c04; }
.ol-switch input:focus-visible + .ol-switch-ui { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.ol-settings-text { margin: 0; color: var(--ink-2); font-size: 0.9rem; }

/* Invite */
.ol-invite { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); }
.ol-invite-label { margin: 0; font-size: 0.85rem; color: var(--ink-2); }
.ol-code-big { margin: 0; font: 800 1.9rem/1.1 var(--font-ui); letter-spacing: 0.22em; color: var(--gold-2); font-variant-numeric: tabular-nums; }
.ol-invite-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ol-copied { margin: 0; min-height: 1.2em; font-size: 0.85rem; color: var(--ink-2); word-break: break-all; }

/* Members */
.ol-members { width: 100%; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ol-member { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); text-align: left; }
.ol-member.me { box-shadow: inset 0 0 0 1px rgba(244, 220, 149, 0.35); }
.ol-member.empty { opacity: 0.55; }
.ol-member.empty .avatar { background: rgba(255, 255, 255, 0.08); box-shadow: none; }
.ol-member .avatar { width: 32px; height: 32px; font-size: 0.9rem; }
.ol-who { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ol-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ol-name small { font-weight: 500; color: var(--ink-3); }
.ol-tag { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; color: var(--ink-2); background: rgba(255, 255, 255, 0.1); }
.ol-tag.host { color: #2b1c04; background: var(--gold); }
.ol-tag.away { color: var(--lose); background: rgba(255, 114, 114, 0.14); }
.ol-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.ol-dot.on { background: var(--win); box-shadow: 0 0 0 3px rgba(95, 211, 148, 0.2); }
.ol-ready { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 800; font-size: 0.85rem; color: transparent; border: 1px solid rgba(255, 255, 255, 0.2); }
.ol-ready.on { color: #04260f; background: var(--win); border-color: transparent; }
.ol-remove { width: 32px; height: 32px; min-height: 32px; font-size: 1.2rem; color: var(--ink-3); }
.ol-room-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Quick match (Brief 11b) ---------- */
.ol-quick { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.ol-quick-lede { margin: 0; color: var(--ink-2); font-size: 0.92rem; }
.ol-quick-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ol-quick-modes .btn { flex-direction: column; gap: 2px; min-height: 60px; padding: 6px 8px; line-height: 1.2; }
.ol-quick-modes .btn small { font-size: 0.75rem; font-weight: 500; color: var(--ink-3); }
.ol-divider { display: flex; align-items: center; gap: 10px; width: 100%; margin: 2px 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.ol-divider::before, .ol-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.14); }
.ol-search-meta { margin: 0; color: var(--ink-2); font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.ol-few { margin: 0; max-width: 32ch; color: var(--ink-3); font-size: 0.88rem; line-height: 1.35; }
.ol-search-dots { display: flex; gap: 8px; justify-content: center; }
.ol-search-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--gold-2); animation: ol-dot 1.2s ease-in-out infinite; }
.ol-search-dots span:nth-child(2) { animation-delay: 0.2s; }
.ol-search-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ol-dot { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .ol-search-dots span { animation: none; opacity: 0.7; } }
.ol-suggest { width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); }
.ol-suggest p { margin: 0; color: var(--ink); font-size: 0.95rem; }

/* ---------- On the table ---------- */
/* The turn clock: a ring round the active seat's avatar that empties as the time runs out. */
.seat .avatar { position: relative; }
.seat.clock .avatar::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(var(--clock-color, var(--gold-2)) calc(var(--left, 1) * 360deg), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
}
.seat.clock.hurry { --clock-color: var(--lose); }
/* A seat a bot plays for someone who dropped (or left). */
.seat.gone .seat-plate { opacity: 0.55; }
.seat.gone .seat-tag { color: var(--lose); }
.seat-plate .guest-tag { margin-left: 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* Quick reactions */
.react-wrap { position: relative; }
.react-btn { min-height: 44px; }
.react-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 240px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(3, 22, 13, 0.97);
  border: 1px solid rgba(217, 180, 90, 0.45);
  box-shadow: var(--shadow);
}
.react-menu .btn { min-height: 40px; padding: 0 8px; font-size: 0.9rem; }

/* Online status line and banners under the table */
.online-bar { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; min-height: 0; }
.online-bar:empty { display: none; }
.online-note { margin: 0; color: var(--ink-2); font-size: 0.92rem; }
.over-members { width: 100%; }

@media (max-width: 480px) {
  .ol-code-big { font-size: 1.6rem; }
  .online-panel { padding: 20px 16px; gap: 12px; }
  .react-menu { width: min(240px, calc(100vw - 32px)); }
}
