/*





 */

/* About page article image — always crop to landscape */
.about-article-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 10px;
}
.about-article-img picture {
  display: block;
  height: 100%;
}
.about-article-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Override Tailwind v4 preflight's appearance: button which causes native Android
   button styling (green) to bleed through when CSS custom properties haven't resolved
   for Turbo Stream-injected DOM elements on Android Chrome. */
button, [type=button], [type=reset], [type=submit] {
  appearance: none;
  -webkit-appearance: none;
}

/* Form Validation Styles */
.field-with-error input,
.field-with-error select,
.field-with-error .checkbox-group,
.field-with-error .radio-group,
.field-with-error {
  @apply border-2 border-red-500 rounded p-2 bg-red-50;
}

.error-message {
  @apply text-red-600 text-sm mt-1 block font-bold;
}
.simple-calendar {
  width: 100%;
  margin-bottom: 2rem;
}

/* The calendar table stays wider than a phone screen so each of the 7 day
   columns keeps enough room to show event titles without excessive wrapping;
   .calendar-scroll lets it scroll horizontally instead of crushing the cells.
   On desktop the container is wider than min-width, so width:100% wins and
   there is no scrollbar. */
.simple-calendar .calendar-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.simple-calendar table {
  width: 100%;
  min-width: 50rem;
  border-collapse: collapse;
}

.simple-calendar th,
.simple-calendar td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.simple-calendar th {
  background-color: #f3f4f6;
  font-weight: 600;
}

/* height on a table cell is a FLOOR, not a fixed size: an empty day still
   occupies 100px, and a day with several games grows to fit them. Anything
   placed inside the cell must therefore use min-height, not a percentage
   height — see the wrapper in admin/meetings/index.html.erb. */
.simple-calendar .day {
  height: 100px;
  vertical-align: top;
}

.simple-calendar .wday-0,
.simple-calendar .wday-6 {
  background-color: #f9fafb;
}

.simple-calendar .today {
  background-color: #e5edff;
}

.simple-calendar .prev-month,
.simple-calendar .next-month {
  background-color: #f9fafb;
  color: #9ca3af;
}

.simple-calendar .calendar-heading {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.simple-calendar .calendar-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.simple-calendar .calendar-heading a {
  color: #4b5563;
  text-decoration: none;
  padding: 0.5rem;
}

.simple-calendar .calendar-heading a:hover {
  color: #1f2937;
}
/* Animation for highlighting updated content */
@keyframes highlight {
  0% {
    background-color: rgba(96, 165, 250, 0.3); /* blue-300 with opacity */
  }
  70% {
    background-color: rgba(96, 165, 250, 0.3); /* blue-300 with opacity */
  }
  100% {
    background-color: transparent;
  }
}

.group-question-text {
  transition: background-color 0.5s ease;
  padding: 8px;
  border-radius: 6px;
}

/* Class for animation trigger */
.question-updated {
  animation: highlight 2s ease-in-out;
}

/* Heartbeat throb for stay button in final minute */
@keyframes throb {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 20px 5px rgba(220, 243, 255, 0.9);
  }
}
.throb {
  animation: throb 1s ease-in-out infinite;
}

/* White-fill heroicon (overrides outline variant's fill="none") */
.help-icon-filled path {
  fill: #fff;
}

/* The stay-with-partner button no longer signals its state with an amber "selected"
   fill. Under STAY_WITH_PARTNER_BY_DEFAULT everyone starts selected, so a pre-lit
   button labelled "+N mins" invited the tap that opted the player OUT. The state now
   lives in the label ("Stay" / "New match") — see availability/_stay_button.html.erb. */

/* Thumbs pulse for feedback buttons — stroke-width + colour */
@keyframes thumbs-pulse-up {
  0%, 100% {
    stroke-width: 1.5;
    stroke: #d1d5db; /* gray-300 */
  }
  50% {
    stroke-width: 3;
    stroke: #22c55e; /* green-500 */
  }
}
@keyframes thumbs-pulse-down {
  0%, 100% {
    stroke-width: 1.5;
    stroke: #d1d5db; /* gray-300 */
  }
  50% {
    stroke-width: 3;
    stroke: #ef4444; /* red-500 */
  }
}
.thumbs-pulse-up svg {
  animation: thumbs-pulse-up 1.5s ease-in-out infinite;
}
.thumbs-pulse-down svg {
  animation: thumbs-pulse-down 1.7s ease-in-out infinite;
}

/* Post-game retention flow CTAs — the same heartbeat as the homepage's
   "Watch the video" button (#hpWatchVideoBtn in new_homepage.html.erb).

   Shared here rather than copied into each stage's view because the flow spans
   five templates (exit survey, retention_message, retention_desire,
   retention_offer, keep_in_touch) and they must throb identically.

   Shadow ONLY — deliberately no `transform: scale()`, unlike @keyframes throb
   above. A perpetual transform means the button's bounding box never settles,
   and Playwright's actionability check waits for a stable box before it will
   click, so a scaling CTA times out every WebKit click test that touches it.
   Named distinctly from the page-local `throb-shadow`/`mk-throb`/`guide-throb`
   copies so it can never shadow one of them. */
@keyframes cta-throb-shadow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(140, 48, 80, 0.3);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(140, 48, 80, 0);
  }
}

.cta-throb {
  animation: cta-throb-shadow 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .cta-throb {
    animation: none;
  }
}
/* The "you're in the game" box (availability/_event_page_play_status), shared by a
   game's own page and the home page. Plain CSS because the home page does not load
   Tailwind; colours are the brand tokens (makuma_tokens.css). */
.play-status {
  margin: 0 0 24px;
  padding: 32px 16px;
  background: #FFFFFF;
  border-radius: var(--radius-card, 20px);
  text-align: center;
}
.play-status--playing {
  border: 1px solid var(--line, #DEE1E6);
  border-left: 4px solid #FFDDCA;
}
.play-status--ready { border: 1px solid var(--line, #DEE1E6); }
.play-status-title {
  margin: 0 0 16px;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 600;
  color: #1F2937;
}
.play-status-title--ready { color: var(--color-heading, #D1684D); }
.play-status-text { margin: 0 0 24px; color: #374151; }
.play-status-btn {
  display: inline-block;
  padding: 12px 32px;
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: var(--color-brand, #A8245A);
  color: #FFFFFF;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.play-status-btn:hover { background: var(--color-brand-hover, #8E1D4B); }
/* Map of Europe on the peer dashboard (Timeleft, Audience): app/views/instagram_engagement/peer_analysis/_peer_map.html.erb */
.peermap { --heat0: #eef4f1; --heat1: #1f6f5c; --land: #e4e8e5; --few: #9db4d6; --rule: #d1d5db; --muted: #6b7280; --fg: #111827;
  --lv1: #f4d35e; --lv2: #ee7d22; --lv3: #d2452b; --lv4: #7b2d8e; background: #fff; }
.peermap-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.peermap-wrap { position: relative; min-width: 560px; }
.peermap-svg { width: 100%; height: auto; display: block; }
.peermap-hatch { fill: var(--rule); }
.peermap-c { stroke: #fff; stroke-width: .6; cursor: pointer; fill: var(--land); }
.peermap-c:hover, .peermap-c.sel { stroke: var(--fg); stroke-width: 1.2; }
.peermap[data-mode="reach"] .peermap-c.r-shade { fill: color-mix(in srgb, var(--heat1) var(--reach), var(--heat0)); }
.peermap[data-mode="reach"] .peermap-c.r-nodata { fill: url(#peermap-hatch); }
.peermap[data-mode="ratio"] .peermap-c.q-shade { fill: color-mix(in srgb, var(--heat1) var(--ratio), var(--heat0)); }
.peermap[data-mode="ratio"] .peermap-c.q-few { fill: var(--few); }
.peermap[data-mode="ratio"] .peermap-c.q-nodata { fill: url(#peermap-hatch); }
.peermap-city { stroke: #fff; stroke-width: 1; cursor: pointer; }
.peermap-city.l0, .peermap-dot.l0 { fill: #fff; background: #fff; stroke: var(--muted); stroke-width: 1.2; }
.peermap-city.l1 { fill: var(--lv1); } .peermap-city.l2 { fill: var(--lv2); } .peermap-city.l3 { fill: var(--lv3); } .peermap-city.l4 { fill: var(--lv4); }
.peermap-city.sel { stroke: var(--fg); stroke-width: 2; }
.peermap-scale { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: .78rem; color: var(--muted); }
.peermap-grad { width: 140px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, var(--heat0), var(--heat1)); }
.peermap-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; border: 1.2px solid transparent; }
.peermap-dot.l0 { border-color: var(--muted); }
.peermap-dot.l1 { background: var(--lv1); } .peermap-dot.l2 { background: var(--lv2); } .peermap-dot.l3 { background: var(--lv3); } .peermap-dot.l4 { background: var(--lv4); }
.peermap-few { background: var(--few); }
.peermap-tip { position: absolute; z-index: 5; pointer-events: none; background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; font-size: .8rem; box-shadow: 0 4px 16px rgb(0 0 0 / .15); max-width: 260px; }
.peermap-tip[hidden] { display: none; }
.peermap[data-mode="reach"] [data-scale="ratio"], .peermap[data-mode="ratio"] [data-scale="reach"] { display: none; }
.peermap[data-mode="reach"] [data-for-mode="ratio"], .peermap[data-mode="ratio"] [data-for-mode="reach"] { display: none; }
/* Adunat's map of Romania: the Europe outlines under a viewBox zoomed to Romania (PeerAnalysis::AdunatMap). */
.peermap-zoom .peermap-c, .peermap-zoom .peermap-city { vector-effect: non-scaling-stroke; }
.peermap-zoom .peermap-c.ro { fill: color-mix(in srgb, var(--heat1) 22%, var(--heat0)); }
.peermap-zoom .peermap-wrap { min-width: 520px; }
.peermap-labels text { fill: var(--fg); paint-order: stroke; stroke: #fff; stroke-linejoin: round; pointer-events: none; }
.peermap-labels .n { font-weight: 700; }
.peermap-labels .leader { stroke: var(--muted); vector-effect: non-scaling-stroke; stroke-width: 1px; }
