/* FCC Family Games - Phase 6D Game Nights — Phase 6D.1 polish */

.fcc-game-night-section {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.92), rgba(232, 246, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(120, 120, 128, 0.14);
  border-radius: 1.25rem;
  backdrop-filter: blur(20px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 24px 48px rgba(15, 23, 42, 0.06);
}

.fcc-game-night-section .fcc-games-section-title {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #172033;
}

.fcc-game-night-hero,
.fcc-game-night-card,
.fcc-game-night-card__actions,
.fcc-game-night-avatar-row,
.fcc-game-night-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fcc-game-night-hero {
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 16px;
}

.fcc-game-night-hero__glass {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(253, 230, 200, 0.45),
    rgba(167, 243, 208, 0.35),
    rgba(147, 197, 253, 0.4)
  );
  box-shadow: 0 20px 50px rgba(13, 148, 136, 0.08);
}

.fcc-game-night-hero__glass::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(
    circle at 30% 20%,
    rgba(251, 191, 36, 0.18),
    transparent 45%
  ),
    radial-gradient(
      circle at 80% 60%,
      rgba(45, 212, 191, 0.16),
      transparent 42%
    );
  pointer-events: none;
  z-index: 0;
}

.fcc-game-night-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  padding: 18px 20px;
  border-radius: calc(1.25rem - 1px);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.82),
      rgba(255, 255, 255, 0.68)
    );
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.fcc-game-night-hero__copy {
  flex: 1 1 220px;
  min-width: 0;
}

.fcc-game-night-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  flex: 0 1 auto;
  justify-content: flex-end;
}

.fcc-game-night-hero__cta .fcc-games-btn--primary {
  min-height: 44px;
  padding-inline: 18px;
}

.fcc-game-night-hero__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 184, 166, 0.35);
  box-sizing: border-box;
}

.fcc-game-night-hero__secondary:hover {
  background: rgba(240, 253, 250, 0.92);
}

.fcc-game-night-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0d9488;
  margin-bottom: 4px;
}

.fcc-game-night-grid {
  display: grid;
  gap: 14px;
  max-width: 100%;
  scroll-margin-top: 12px;
}

.fcc-game-night-card {
  position: relative;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
  padding: 16px 16px 14px;
  border-radius: 1.25rem;
  background: linear-gradient(
      165deg,
      rgba(255, 255, 255, 0.88),
      rgba(248, 250, 252, 0.72)
    );
  border: 1px solid rgba(120, 120, 128, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 18px 40px rgba(31, 41, 55, 0.08);
}

.fcc-game-night-card--tonight {
  border-color: rgba(45, 212, 191, 0.38);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 20px 44px rgba(13, 148, 136, 0.12);
}

.fcc-game-night-card--recap {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(
    165deg,
    rgba(255, 251, 235, 0.95),
    rgba(255, 255, 255, 0.78)
  );
}

.fcc-game-night-card__main {
  min-width: 0;
  flex: 1 1 200px;
}

.fcc-game-night-card__main h4 {
  margin: 2px 0 6px;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}

.fcc-game-night-card__schedule {
  margin: 0 0 8px;
  line-height: 1.35;
}

.fcc-game-night-card__segments-hint {
  margin: 0 0 10px;
}

.fcc-game-night-card__recap {
  margin: 0 0 10px;
}

.fcc-game-night-card__recap-hint {
  margin: 0 0 8px;
  line-height: 1.45;
}

.fcc-game-night-segment-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 10px;
  margin: 0 -2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.fcc-game-night-segment-chip {
  flex: 0 0 auto;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(120, 120, 128, 0.09);
  border: 1px solid rgba(120, 120, 128, 0.14);
  color: #374151;
}

.fcc-game-night-segment-chip--casual {
  background: rgba(239, 246, 255, 0.95);
  border-color: rgba(96, 165, 250, 0.28);
  color: #1e40af;
}

.fcc-game-night-segment-chip--tournament {
  background: rgba(250, 245, 255, 0.95);
  border-color: rgba(192, 132, 252, 0.32);
  color: #6b21a8;
}

.fcc-game-night-segment-chip--board {
  background: rgba(255, 244, 224, 0.95);
  border-color: rgba(202, 138, 4, 0.32);
  color: #92400e;
  font-weight: 800;
}

.fcc-game-night-card__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-width: 92px;
}

.fcc-game-night-card__actions {
  flex: 1 1 100%;
  width: 100%;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-self: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(120, 120, 128, 0.1);
}

.fcc-game-night-card__actions .fcc-games-btn {
  min-height: 42px;
}

.fcc-game-night-avatar-row {
  margin-top: 12px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.fcc-game-night-avatar {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  margin-left: -8px;
  color: #172033;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid rgba(255, 255, 255, 0.95);
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.fcc-game-night-avatar:first-child {
  margin-left: 0;
}

.fcc-game-night-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fcc-game-night-avatar--more {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  background: rgba(241, 245, 249, 0.95);
}

.fcc-game-night-ring {
  --pct: 0;
  box-sizing: border-box;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: 3px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), transparent 55%),
    conic-gradient(
      from 0deg,
      rgba(20, 184, 166, 0.95) calc(var(--pct) * 1%),
      rgba(203, 213, 225, 0.35) 0
    );
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.06) inset,
    0 8px 24px rgba(13, 148, 136, 0.12);
}

.fcc-game-night-ring::after {
  content: "";
  grid-area: 1 / 1;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.98),
    rgba(248, 250, 252, 0.94)
  );
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  pointer-events: none;
}

.fcc-game-night-ring__label {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  padding: 0 8px;
  text-align: center;
  line-height: 1.15;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.fcc-game-night-ring--pulse {
  animation: fcc-game-night-ring-pulse 2.6s ease-in-out infinite;
}

@keyframes fcc-game-night-ring-pulse {
  0%,
  100% {
    filter: brightness(1);
    box-shadow:
      0 6px 20px rgba(15, 23, 42, 0.06) inset,
      0 8px 24px rgba(13, 148, 136, 0.12);
  }
  50% {
    filter: brightness(1.03);
    box-shadow:
      0 6px 20px rgba(15, 23, 42, 0.06) inset,
      0 10px 28px rgba(13, 148, 136, 0.18);
  }
}

.fcc-game-night-status,
.fcc-game-night-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
  background: rgba(120, 120, 128, 0.11);
  border: 1px solid rgba(120, 120, 128, 0.16);
  color: #374151;
}

.fcc-game-night-status--draft {
  color: #57534e;
  background: rgba(245, 245, 244, 0.95);
  border-color: rgba(120, 113, 108, 0.25);
}

.fcc-game-night-status--scheduled,
.fcc-game-night-status--active {
  color: #0f766e;
  background: rgba(20, 184, 166, 0.14);
  border-color: rgba(20, 184, 166, 0.28);
}

.fcc-game-night-status--completed {
  color: #854d0e;
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(245, 158, 11, 0.32);
}

.fcc-game-night-status--cancelled,
.fcc-game-night-status--archived {
  color: #64748b;
  opacity: 0.72;
}

.fcc-game-night-badge {
  color: #1d4ed8;
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
}

.fcc-game-night-badge--warm {
  color: #92400e;
  background: rgba(254, 243, 199, 0.85);
  border-color: rgba(251, 191, 36, 0.45);
  text-transform: none;
  font-weight: 700;
}

.fcc-game-night-calendar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fcc-game-night-calendar-badge--linked {
  color: #1e40af;
  background: rgba(191, 219, 254, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.fcc-game-night-calendar-badge--optional {
  color: #4f46e5;
  background: rgba(224, 231, 255, 0.75);
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.fcc-game-night-calendar-badge--unavailable {
  color: #64748b;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  text-transform: none;
  font-size: 11px;
  font-weight: 700;
}

.fcc-game-night-reminder {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(120, 120, 128, 0.2);
}

.fcc-game-night-empty {
  padding: 24px 20px;
  border-radius: 1.25rem;
  text-align: center;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.72),
      rgba(250, 250, 249, 0.55)
    );
  border: 1px dashed rgba(120, 120, 128, 0.22);
  max-width: 100%;
}

.fcc-game-night-empty__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 800;
  color: #1c1917;
}

.fcc-game-night-empty .muted {
  margin: 0 0 6px;
  max-width: 36rem;
  margin-inline: auto;
}

.fcc-game-night-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(14px);
}

.fcc-game-night-modal {
  width: min(640px, 100%);
  max-height: min(85vh, 800px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.375rem;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(248, 250, 252, 0.96)
  );
  border: 1px solid rgba(120, 120, 128, 0.14);
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.fcc-game-night-modal__header {
  flex-shrink: 0;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(120, 120, 128, 0.1);
}

.fcc-game-night-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
}

.fcc-game-night-modal .fcc-game-night-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0;
}

.fcc-game-night-modal .fcc-games-phase6-modal__actions {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 14px;
  padding-bottom: 4px;
  border-top: 1px solid rgba(120, 120, 128, 0.12);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.95) 28%
  );
  position: sticky;
  bottom: 0;
}

.fcc-game-night-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fcc-game-night-form__section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(120, 120, 128, 0.08);
}

.fcc-game-night-form__section:last-of-type {
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.fcc-game-night-form__section-title {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
  margin-bottom: 4px;
}

.fcc-game-night-form__section-desc {
  margin: 0 0 14px;
  line-height: 1.4;
}

.fcc-game-night-form__placeholder-note {
  margin: 4px 0 12px;
  font-style: italic;
}

.fcc-game-night-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  max-width: 100%;
}

.fcc-game-night-check,
.fcc-game-night-toggle {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.08);
  border: 1px solid rgba(120, 120, 128, 0.14);
  font-weight: 700;
  font-size: 0.875rem;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.fcc-game-night-toggle--placeholder {
  opacity: 0.88;
}

.fcc-game-night-check:has(input:checked),
.fcc-game-night-toggle:has(input:checked) {
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(13, 148, 136, 0.45);
}

.fcc-game-night-check input,
.fcc-game-night-toggle input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #14b8a6;
}

.fcc-game-night-modal .fcc-games-phase6-field span,
.fcc-game-night-modal .fcc-games-phase6-field > span {
  font-weight: 700;
  color: #374151;
}

.fcc-game-night-modal .fcc-games-phase6-field input[type="text"],
.fcc-game-night-modal .fcc-games-phase6-field input[type="datetime-local"],
.fcc-game-night-modal .fcc-games-phase6-field select {
  min-height: 44px;
  border-radius: 12px;
}

.fcc-game-night-section .fcc-games-btn:focus-visible,
.fcc-game-night-modal .fcc-games-btn:focus-visible,
.fcc-game-night-hero__secondary:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.65);
  outline-offset: 2px;
}

.fcc-game-night-check:focus-within,
.fcc-game-night-toggle:focus-within {
  outline: 2px solid rgba(13, 148, 136, 0.45);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .fcc-game-night-card {
    flex-direction: column;
    align-items: stretch;
  }

  .fcc-game-night-card__side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
  }

  .fcc-game-night-card__actions {
    justify-content: stretch;
  }

  .fcc-game-night-card__actions .fcc-games-btn {
    flex: 1 1 120px;
  }

  .fcc-game-night-hero__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .fcc-game-night-hero__cta {
    justify-content: stretch;
    flex-direction: column;
  }

  .fcc-game-night-hero__cta .fcc-games-btn--primary,
  .fcc-game-night-hero__secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fcc-game-night-ring--pulse {
    animation: none;
  }
}
