/* Mounazara website. Bootstrap 5.3 (its RTL build in Arabic) does the heavy lifting; these are the
   game-specific bits. Use logical properties (margin-inline-start...) so both directions work. */

:root {
  --bs-body-font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
}

body {
  min-height: 100vh;
}

html[lang="ar"] body {
  line-height: 1.7;
}

.hero-lead {
  max-width: 40rem;
}

/* MVC validation output, styled like Bootstrap's */
.validation-summary-valid {
  display: none;
}

.validation-summary-errors ul {
  margin: 0;
  padding-inline-start: 1rem;
}

.input-validation-error {
  border-color: var(--bs-form-invalid-border-color) !important;
}

.field-validation-error {
  display: block;
  margin-top: .25rem;
}

/* Presence dots */
.dot {
  display: inline-block;
  flex: none;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--bs-gray-500);
}

.dot.on {
  background: #20c997;
  box-shadow: 0 0 0 3px rgba(32, 201, 151, .2);
}

/* Live-updates indicator in the navbar */
.conn-dot {
  display: inline-block;
  width: .65rem;
  height: .65rem;
  border-radius: 50%;
  background: #dc3545;
}

.conn-dot.online { background: #20c997; }
.conn-dot.connecting,
.conn-dot.reconnecting { background: #ffc107; }

/* The live stage */
.stage .card-body {
  padding: 2rem 1rem;
}

.stage-icon {
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: .5rem;
}

.timer {
  font-size: clamp(3rem, 14vw, 5.5rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin: .5rem 0;
  direction: ltr;
  unicode-bidi: isolate;
}

.stage-bar {
  height: .6rem;
  max-width: 28rem;
}

.progress-bar {
  transition: width .2s linear;
}

/* Result: scores and points by category */
.result-player > summary {
  cursor: pointer;
}

.score-cell {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.score-bar {
  display: inline-flex;
  width: 4rem;
  height: .4rem;
}

.points-table td,
.points-table th {
  vertical-align: middle;
}

/* The small speech player (position, from the start, −10 s, ▶/⏸, +10 s) */
.player {
  max-width: 28rem;
}

.player-btn {
  width: 2.5rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.player-btn.player-main {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  font-size: 1.1rem;
}

.player-bar {
  height: .4rem;
}

.player-time {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@keyframes mm-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.pulse {
  animation: mm-pulse 1.2s ease-in-out infinite;
}

/* Lists */
.rank {
  width: 1.75rem;
  text-align: center;
  font-weight: 600;
  color: var(--bs-secondary-color);
}

details > summary {
  cursor: pointer;
}

.toast {
  min-width: 18rem;
}

.transcript {
  white-space: pre-wrap;
}

.transcript-item {
  border-inline-start: 3px solid var(--bs-border-color);
  padding-inline-start: .5rem;
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
}
