/* ═══════════════════════════════════════════════
   E-FUTEBOL.NET — FIRST GOAL WARNING MODAL (FGW)
   Pré-jogo: avisa o usuário sobre as regras de
   janela de transferência antes do primeiro gol.
   ═══════════════════════════════════════════════ */

#first-goal-warning-container:empty { display: none; }

.fgw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}

.fgw-overlay--in {
  opacity: 1;
  pointer-events: auto;
}

.fgw-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(16, 185, 129, 0.32), transparent 60%),
    rgba(2, 14, 8, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Card ── */

.fgw-card {
  --fgw-accent: #047857;
  --fgw-accent-soft: #d1fae5;
  --fgw-accent-deep: #022c1c;
  --fgw-amber: #b45309;
  --fgw-amber-soft: rgba(245, 158, 11, 0.12);

  position: relative;
  z-index: 9302;
  width: min(460px, 100%);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);  /* dvh respeita barra de URL em mobile */
  overflow-y: auto;
  overscroll-behavior: contain;     /* não vaza scroll pro body */
  -webkit-overflow-scrolling: touch; /* scroll suave em iOS */
  background: #ffffff;
  border-radius: 22px;
  box-shadow:
    0 0 0 1px rgba(2, 44, 28, 0.08),
    0 32px 80px -20px rgba(2, 44, 28, 0.45),
    0 12px 32px -8px rgba(0, 0, 0, 0.18);
  transform: scale(0.94) translateY(18px);
  opacity: 0;
  transition:
    transform 0.46s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}

/* Scrollbar sutil que não polui o card */
.fgw-card::-webkit-scrollbar {
  width: 6px;
}
.fgw-card::-webkit-scrollbar-track {
  background: transparent;
}
.fgw-card::-webkit-scrollbar-thumb {
  background: rgba(4, 120, 87, 0.18);
  border-radius: 999px;
}
.fgw-card::-webkit-scrollbar-thumb:hover {
  background: rgba(4, 120, 87, 0.32);
}
.fgw-card {
  scrollbar-width: thin;
  scrollbar-color: rgba(4, 120, 87, 0.18) transparent;
}

.fgw-card--in {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.fgw-card--out {
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ── Header (identity zone) ── */

.fgw-header {
  position: relative;
  padding: 2rem 1.75rem 1.5rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.15), transparent 65%),
    var(--fgw-accent-soft);
  border-bottom: 1px solid rgba(2, 44, 28, 0.06);
  text-align: left;
  overflow: hidden;
}

.fgw-header::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(2, 44, 28, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.fgw-header::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(2, 44, 28, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.fgw-eyebrow {
  display: inline-block;
  font-family: var(--font-display, ui-serif, Georgia, serif);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fgw-accent);
  margin-bottom: 0.85rem;
}

.fgw-title {
  font-family: var(--font-display, ui-serif, Georgia, serif);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.18;
  color: var(--fgw-accent-deep);
  margin: 0 0 0.85rem;
  letter-spacing: -0.012em;
}

.fgw-title-accent {
  color: var(--fgw-accent);
  font-style: italic;
}

.fgw-lead {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-secondary, #4a5b4f);
  margin: 0;
  max-width: 36ch;
}

.fgw-lead strong {
  color: var(--fgw-accent-deep);
  font-weight: 600;
}

/* ── Rule callout (Janela 1 lock) ── */

.fgw-rule {
  display: flex;
  gap: 0.85rem;
  padding: 1.1rem 1.75rem;
  background: var(--fgw-amber-soft);
  border-bottom: 1px solid rgba(245, 158, 11, 0.18);
  align-items: flex-start;
}

.fgw-rule-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--fgw-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.fgw-rule-body {
  flex: 1;
  min-width: 0;
}

.fgw-rule-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fgw-amber);
  margin: 0 0 0.3rem;
}

.fgw-rule-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary, #4a5b4f);
  margin: 0;
}

.fgw-rule-text strong {
  color: var(--fgw-accent-deep);
  font-weight: 600;
}

/* ── Windows timeline ── */

.fgw-windows {
  padding: 1.1rem 1.75rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.fgw-windows-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted, #6b7d70);
  margin-bottom: 0.65rem;
}

.fgw-windows-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.fgw-window-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: var(--bg-elevated, #f7faf8);
  border: 1px solid var(--border-subtle, #e5ece8);
  border-radius: 10px;
  font-size: 0.82rem;
}

.fgw-window-item--active {
  background: var(--fgw-accent-soft);
  border-color: rgba(4, 120, 87, 0.3);
}

.fgw-window-item--next {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
}

.fgw-window-num {
  font-family: var(--font-display, ui-serif, Georgia, serif);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-primary, #0c1f12);
  min-width: 4.6rem;
}

.fgw-window-dates {
  flex: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary, #4a5b4f);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.fgw-window-sep {
  color: var(--text-muted, #97a59c);
  font-weight: 400;
}

.fgw-window-badge {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--fgw-accent);
  color: #fff;
}

.fgw-window-badge--next {
  background: rgba(245, 158, 11, 0.16);
  color: var(--fgw-amber);
}

/* ── Actions ── */

.fgw-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.25rem 1.75rem 0.85rem;
  position: sticky;
  bottom: 0;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ffffff 30%, #ffffff 100%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

[data-theme="dark"] .fgw-actions {
  background:
    linear-gradient(to bottom, rgba(12, 31, 18, 0) 0%, #0c1f12 30%, #0c1f12 100%);
}

.fgw-actions form {
  margin: 0;
}

.fgw-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-family: var(--font-body, system-ui, sans-serif);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
  text-decoration: none;
  font-family: inherit;
}

.fgw-btn:active {
  transform: translateY(1px) scale(0.99);
}

.fgw-btn--primary {
  background: var(--fgw-accent);
  color: #ffffff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 8px 20px -6px rgba(4, 120, 87, 0.45),
    0 2px 6px -2px rgba(4, 120, 87, 0.3);
}

.fgw-btn--primary:hover {
  background: #035c45;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 12px 28px -8px rgba(4, 120, 87, 0.55),
    0 4px 10px -3px rgba(4, 120, 87, 0.35);
  transform: translateY(-1px);
}

.fgw-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.fgw-btn--ghost {
  background: transparent;
  color: var(--text-secondary, #4a5b4f);
  border-color: var(--border, #d4dcd8);
}

.fgw-btn--ghost:hover {
  background: var(--bg-elevated, #f7faf8);
  color: var(--fgw-accent-deep);
  border-color: var(--fgw-accent);
}

.fgw-btn--ghost svg {
  transition: transform 0.18s ease;
}

.fgw-btn--ghost:hover svg {
  transform: translateX(3px);
}

/* ── Fineprint ── */

.fgw-fineprint {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--text-muted, #97a59c);
  text-align: center;
  margin: 0.4rem 0 0;
  padding-bottom: 0.55rem;
}

.fgw-fineprint a {
  color: var(--fgw-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.fgw-fineprint a:hover {
  color: var(--fgw-accent-deep);
}

/* ── Mobile ── */

@media (max-width: 640px) {
  .fgw-overlay {
    padding: 0.5rem;
    align-items: flex-end;  /* gruda no rodapé pra ficar mais alcançável */
  }

  .fgw-card {
    border-radius: 16px;
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .fgw-header {
    padding: 1.1rem 1.2rem 0.95rem;
  }
  .fgw-header::before,
  .fgw-header::after {
    display: none;  /* remove os círculos decorativos pra economizar espaço visual */
  }

  .fgw-eyebrow {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    margin-bottom: 0.45rem;
  }

  .fgw-title {
    font-size: 1.18rem;
    line-height: 1.18;
    margin-bottom: 0.55rem;
  }

  .fgw-title br {
    display: none;  /* deixa o título fluir naturalmente em vez de forçar 2 linhas */
  }

  .fgw-title-accent {
    display: inline;
  }

  .fgw-lead {
    font-size: 0.82rem;
    line-height: 1.5;
  }

  .fgw-rule {
    padding: 0.85rem 1.2rem;
    gap: 0.65rem;
  }

  .fgw-rule-icon {
    width: 30px;
    height: 30px;
  }
  .fgw-rule-icon svg { width: 16px; height: 16px; }

  .fgw-rule-title {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
  }
  .fgw-rule-text {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .fgw-windows {
    padding: 0.85rem 1.2rem 0.9rem;
  }
  .fgw-windows-label {
    font-size: 0.62rem;
    margin-bottom: 0.45rem;
  }
  .fgw-window-item {
    padding: 0.45rem 0.6rem;
    gap: 0.5rem;
    font-size: 0.76rem;
  }
  .fgw-window-num {
    font-size: 0.72rem;
    min-width: 4rem;
  }
  .fgw-window-badge {
    font-size: 0.56rem;
    padding: 0.14rem 0.4rem;
  }

  .fgw-actions {
    padding: 0.9rem 1.2rem 0.55rem;
    gap: 0.45rem;
  }
  .fgw-btn {
    padding: 0.75rem 1rem;
    font-size: 0.86rem;
    border-radius: 10px;
  }
  .fgw-btn-icon {
    width: 18px;
    height: 18px;
  }

  .fgw-fineprint {
    font-size: 0.66rem;
    line-height: 1.45;
    margin-top: 0.3rem;
    padding-bottom: 0.4rem;
  }
}

/* Telas muito pequenas: aperta ainda mais */
@media (max-width: 360px) {
  .fgw-title {
    font-size: 1.05rem;
  }
  .fgw-lead {
    font-size: 0.78rem;
  }
  .fgw-rule-text,
  .fgw-window-item {
    font-size: 0.74rem;
  }
}

/* ── Dark theme ── */

[data-theme="dark"] .fgw-card {
  background: #0c1f12;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 32px 80px -20px rgba(0, 0, 0, 0.7),
    0 12px 32px -8px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .fgw-header {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.18), transparent 65%),
    rgba(4, 120, 87, 0.12);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .fgw-header::before,
[data-theme="dark"] .fgw-header::after {
  border-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .fgw-title,
[data-theme="dark"] .fgw-window-num {
  color: #e5f4ec;
}

[data-theme="dark"] .fgw-title-accent {
  color: #6ee7b7;
}

[data-theme="dark"] .fgw-lead,
[data-theme="dark"] .fgw-rule-text,
[data-theme="dark"] .fgw-window-dates,
[data-theme="dark"] .fgw-btn--ghost {
  color: #b8c8be;
}

[data-theme="dark"] .fgw-lead strong,
[data-theme="dark"] .fgw-rule-text strong {
  color: #e5f4ec;
}

[data-theme="dark"] .fgw-eyebrow,
[data-theme="dark"] .fgw-windows-label {
  color: #6ee7b7;
}

[data-theme="dark"] .fgw-window-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .fgw-window-item--active {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(110, 231, 183, 0.3);
}

[data-theme="dark"] .fgw-btn--ghost {
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .fgw-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e5f4ec;
}

[data-theme="dark"] .fgw-fineprint {
  color: #8b9a90;
}
