/* ==========================================================
   Formulário Geral — CSS PlayStation Edition
   Flavor Theme · ps-redesign v2.0
   ========================================================== */

/* ─── Google Fonts fallback hint (carregado pelo header.php do tema) ─── */
/* Barlow Condensed 800 · Barlow 400 500 600 700                          */

/* ─── Variáveis locais (não poluem :root do tema) ─────────────────────── */
.fg-wrap {
  /* Paleta PS */
  --ps-bg:            #050C15;
  --ps-surface:       #0D1A2A;
  --ps-surface-hi:    #122135;
  --ps-border:        #192D44;
  --ps-border-focus:  #0070D1;
  --ps-accent:        #00A8E8;
  --ps-accent-glow:   rgba(0,168,232,0.22);
  --ps-accent-strong: rgba(0,168,232,0.45);
  --ps-cta:           #0070D1;
  --ps-cta-hover:     #0058A8;
  --ps-danger:        #E8002A;
  --ps-success:       #00C49A;
  --ps-warning:       #F5A623;

  /* Texto */
  --ps-text:          #FFFFFF;
  --ps-text-sec:      #8599B2;
  --ps-text-muted:    #3D5470;

  /* Tipografia */
  --ps-font:          'Barlow', Arial, sans-serif;
  --ps-display:       'Barlow Condensed', 'Arial Narrow', sans-serif;

  /* Sombras */
  --ps-shadow-glow:   0 0 16px rgba(0,168,232,0.22);
  --ps-shadow-cta:    0 4px 24px rgba(0,112,209,0.40);
  --ps-shadow-lg:     0 8px 40px rgba(0,0,0,0.70);

  /* Raios */
  --ps-r:             4px;
  --ps-r-lg:          6px;
}

/* ─── Reset mínimo dentro do scope ─────────────────────────────────────── */
.fg-wrap *,
.fg-wrap *::before,
.fg-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
button#btn-open-video {
    display: none !important;
}
/* ─── Wrapper externo ───────────────────────────────────────────────────── */
.fg-wrap {
  max-width: 720px;
  margin: 32px auto 64px;
  font-family: var(--ps-font);
  color: var(--ps-text);

  /* Entrada */
  opacity: 0;
  transform: translateY(18px);
  animation: psSlideIn 0.55s cubic-bezier(0.22,1,0.36,1) 0.1s forwards;
}

@media (max-width: 600px) {
  .fg-wrap { margin: 16px 12px 48px; }
}

/* ─── Header do painel ──────────────────────────────────────────────────── */
.fg-panel-header {
  position: relative;
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-bottom: none;
  border-radius: var(--ps-r-lg) var(--ps-r-lg) 0 0;
  padding: 28px 32px 24px 36px;
  overflow: hidden;
}

/* Gradiente diagonal de fundo (estilo banner PS Store) */
.fg-panel-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg,
      rgba(0,112,209,0.18) 0%,
      transparent 55%,
      rgba(0,168,232,0.06) 100%);
  pointer-events: none;
}

/* Linha decorativa lateral esquerda (assinatura Flavor/PS) */
.fg-panel-header::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    #00A8E8 25%,
    #0070D1 75%,
    transparent 100%
  );
}

/* Scan-line sutil de profundidade */
.fg-panel-header .ps-scanline {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(255,255,255,0.012) 3px,
    rgba(255,255,255,0.012) 4px
  );
  pointer-events: none;
  z-index: 0;
}

.fg-panel-header-inner {
  position: relative;
  z-index: 1;
}

/* Eyebrow (tipo "CONFIGURAÇÕES > CONTA") */
.fg-eyebrow {
  font-family: var(--ps-font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ps-accent);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fg-eyebrow::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--ps-accent);
  flex-shrink: 0;
}

/* Título principal */
.fg-title {
  font-family: var(--ps-display);
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ps-text);
  line-height: 1.05;
  margin-bottom: 10px;
}

/* Subtítulo / nota */
.fg-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--ps-text-sec);
  line-height: 1.6;
}

/* ─── Símbolos do controle (decorativos / semânticos) ───────────────────── */
.ps-symbols {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.ps-sym {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--ps-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ps-text-muted);
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  font-family: var(--ps-display);
}

.ps-sym--active {
  border-color: var(--ps-accent);
  color: var(--ps-accent);
  box-shadow: 0 0 8px rgba(0,168,232,0.30);
}
.ps-sym--cross  { font-size: 14px; }
.ps-sym--circle { font-size: 15px; }

/* ─── Corpo do painel (formulário) ──────────────────────────────────────── */
.fg-panel-body {
  background: var(--ps-bg);
  border: 1px solid var(--ps-border);
  border-top: none;
  border-radius: 0 0 var(--ps-r-lg) var(--ps-r-lg);
  padding: 32px 32px 28px;
}

@media (max-width: 600px) {
  .fg-panel-header { padding: 22px 20px 20px 24px; }
  .fg-panel-body   { padding: 24px 16px 20px; }
}

/* ─── Nota de atenção (Companion) ───────────────────────────────────────── */
.fg-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(0,112,209,0.08);
  border: 1px solid rgba(0,112,209,0.25);
  border-left: 3px solid var(--ps-cta);
  border-radius: var(--ps-r);
  padding: 12px 14px;
  margin-bottom: 28px;
}

.fg-alert-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--ps-cta);
  color: var(--ps-cta);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.fg-alert p {
  font-size: 13px;
  color: var(--ps-text-sec);
  line-height: 1.6;
}

.fg-alert strong {
  color: var(--ps-text);
  font-weight: 600;
}

/* ─── Separador de seção ────────────────────────────────────────────────── */
.fg-section-label {
  font-family: var(--ps-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ps-text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ps-border);
  margin-bottom: 20px;
  margin-top: 28px;
}

.fg-section-label:first-child { margin-top: 0; }

/* ─── Grid de campos ─────────────────────────────────────────────────────── */
.fg-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.fg-row.fg-row--two { grid-template-columns: 1fr 1fr; }

@media (max-width: 600px) {
  .fg-row.fg-row--two { grid-template-columns: 1fr; }
}

/* ─── Grupos de campo ────────────────────────────────────────────────────── */
.fg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ─── Labels ─────────────────────────────────────────────────────────────── */
.fg-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ps-text-sec);
  display: flex;
  align-items: center;
  gap: 6px;
}

.fg-label .fg-label-req {
  color: var(--ps-accent);
  font-size: 14px;
  line-height: 1;
}

.fg-label-opt {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ps-text-muted);
  text-transform: none;
  font-style: italic;
}

/* ─── Inputs / Textarea ──────────────────────────────────────────────────── */
.fg-input,
.fg-textarea {
  width: 100%;
  background: #0D1A2A;
  background: var(--ps-surface, #0D1A2A);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-r);
  color: var(--ps-text);
  font-family: var(--ps-font);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 14px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  -webkit-appearance: none;
}

.fg-input::placeholder,
.fg-textarea::placeholder {
  color: var(--ps-text-muted);
  font-weight: 400;
}

.fg-input:hover,
.fg-textarea:hover {
  border-color: var(--ps-border-focus);
}

.fg-input:focus,
.fg-textarea:focus {
  border-color: var(--ps-accent);
  background: var(--ps-surface-hi, #122135);
  box-shadow: 0 0 0 3px rgba(0,168,232,0.15), inset 0 0 0 1px rgba(0,168,232,0.12);
}

.fg-textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}

/* ─── Tutorial accordion ─────────────────────────────────────────────────── */
.fg-accordion {
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-r);
  overflow: hidden;
}

.fg-accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ps-text-sec);
  cursor: pointer;
  background: var(--ps-surface);
  transition: background 0.15s;
  user-select: none;
}

.fg-accordion summary::-webkit-details-marker { display: none; }
.fg-accordion summary::marker { display: none; }

.fg-accordion summary:hover {
  background: var(--ps-surface-hi);
  color: var(--ps-text);
}

/* Chevron animado */
.fg-accordion-chevron {
  margin-left: auto;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: var(--ps-text-muted);
}

.fg-accordion-chevron svg {
  display: block;
}

.fg-accordion[open] .fg-accordion-chevron {
  transform: rotate(180deg);
}

.fg-accordion[open] summary {
  border-bottom: 1px solid var(--ps-border);
}

.fg-accordion-body {
  padding: 16px;
  background: rgba(5,12,21,0.6);
  font-size: 13px;
  color: var(--ps-text-sec);
  line-height: 1.7;
}

.fg-accordion-body ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fg-accordion-body li strong {
  color: var(--ps-text);
}

.fg-accordion-body li em {
  color: var(--ps-accent);
  font-style: normal;
  font-weight: 600;
}

.fg-video-trigger-wrap {
  margin-top: 14px;
}

/* ─── Área de captura (câmera / foto) ────────────────────────────────────── */
.fg-capture-card {
  background: var(--ps-surface);
  border: 1px dashed var(--ps-border);
  border-radius: var(--ps-r);
  padding: 16px;
  margin-top: 6px;
}

.fg-capture-card video,
.fg-capture-card canvas,
.fg-capture-card img.fg-preview {
  width: 100%;
  border-radius: var(--ps-r);
  background: #000;
  display: block;
  margin-bottom: 10px;
}

.fg-capture-hint {
  font-size: 11px;
  color: var(--ps-text-muted);
  letter-spacing: 0.04em;
  margin-top: 10px;
}

.fg-capture-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ─── Botões secundários (PS-style) ─────────────────────────────────────── */
.fg-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-r);
  color: var(--ps-text-sec);
  font-family: var(--ps-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 14px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}

.fg-btn-ghost:hover {
  border-color: var(--ps-accent);
  color: var(--ps-accent);
  background: rgba(0,168,232,0.06);
}

/* ─── Botão CTA principal (PS Store "Comprar agora") ────────────────────── */
.fg-btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--ps-r);
  cursor: pointer;

  background: var(--ps-cta);
  color: #fff;
  font-family: var(--ps-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;

  box-shadow: var(--ps-shadow-cta);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

/* Gloss superior */
.fg-btn-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    130% 70% at 50% -10%,
    rgba(255,255,255,0.12),
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
}

/* Sheen slide */
.fg-btn-cta::after {
  content: '';
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(
    to right,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.10) 35%,
    rgba(255,255,255,0.28) 50%,
    rgba(255,255,255,0.10) 65%,
    rgba(255,255,255,0) 100%
  );
  transform: rotate(22deg) translateX(-180%);
  animation: psSheenLoop 3s cubic-bezier(0.4,0,0.2,1) 1.5s infinite both;
  pointer-events: none;
  z-index: 2;
}

.fg-btn-cta:hover {
  background: var(--ps-cta-hover);
  box-shadow: 0 6px 28px rgba(0,112,209,0.55);
  transform: translateY(-2px) translateZ(0);
}

.fg-btn-cta:active {
  transform: translateY(1px) translateZ(0);
  box-shadow: 0 2px 10px rgba(0,112,209,0.35);
}

/* Ícone × no botão */
.fg-btn-cta .ps-btn-icon {
  font-size: 20px;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1;
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .fg-btn-cta::after { animation: none; opacity: 0; }
}

/* ─── Rodapé do painel (dica PS) ──────────────────────────────────────────── */
.fg-panel-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0 0;
  margin-top: 24px;
  border-top: 1px solid var(--ps-border);
}

.fg-panel-footer-sym {
  display: flex;
  gap: 8px;
}

.fg-panel-footer-hint {
  font-size: 11px;
  color: var(--ps-text-muted);
  letter-spacing: 0.04em;
}

/* ─── Modal do vídeo ──────────────────────────────────────────────────────── */
.fg-modal[hidden] { display: none !important; }

.fg-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fg-modal .fg-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5,12,21,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fg-modal .fg-modal-box {
  position: relative;
  width: min(960px, 92vw);
  aspect-ratio: 16 / 9;
  max-height: 90vh;
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-r-lg);
  box-shadow: var(--ps-shadow-lg), 0 0 40px rgba(0,168,232,0.08);
  overflow: hidden;
}

/* Linha accent no topo do modal */
.fg-modal .fg-modal-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ps-accent), transparent);
  z-index: 2;
}

.fg-modal .fg-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 32px;
  height: 32px;
  background: var(--ps-surface-hi);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-r);
  color: var(--ps-text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.fg-modal .fg-modal-close:hover {
  border-color: var(--ps-accent);
  background: rgba(0,168,232,0.12);
}

.fg-modal .fg-modal-video {
  position: absolute;
  inset: 0;
}

.fg-modal .fg-modal-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── Animações ───────────────────────────────────────────────────────────── */
@keyframes psSlideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes psSheenLoop {
  0%   { transform: rotate(22deg) translateX(-180%); opacity: 0; }
  10%  { opacity: 0.6; }
  60%  { transform: rotate(22deg) translateX(180%);  opacity: 0.6; }
  75%  { opacity: 0; }
  100% { transform: rotate(22deg) translateX(180%);  opacity: 0; }
}

/* ─── h1 oculto (title tag da página) ────────────────────────────────────── */
.section h1 { display: none; }

/* ─── Reset de ::before/::after injetados pelo tema nos .btn genéricos ────── */
.fg-wrap .fg-btn-cta::before,
.fg-wrap .fg-btn-cta::after {
  /* Não resetar — usamos esses pseudo-elementos para os efeitos acima */
}
.fg-wrap .fg-btn-ghost::before,
.fg-wrap .fg-btn-ghost::after {
  content: none !important;
}

/* ─── Utility: ocultar elemento de forma acessível ───────────────────────── */
.fg-hidden { display: none !important; }

/* ─── Spacing helper ──────────────────────────────────────────────────────── */
.fg-mt-lg { margin-top: 28px; }
.fg-mb-sm { margin-bottom: 8px; }