/* ════════════════════════════════════════════════════════
   Flash Pulse – Frontend Styles
   ════════════════════════════════════════════════════════ */

:root {
  --fp-primary:   #ff4f1f;
  --fp-accent:    #ffb347;
  --fp-dark:      #1a1a2e;
  --fp-surface:   #ffffff;
  --fp-text:      #1a1a2e;
  --fp-muted:     #6b7280;
  --fp-border:    #e5e7eb;
  --fp-radius:    16px;
  --fp-font:      'Segoe UI', system-ui, -apple-system, sans-serif;
  --fp-shadow:    0 4px 24px rgba(0,0,0,.10);
}

/* ─── Widget shell ────────────────────────────────────── */
.fp-widget {
  font-family: var(--fp-font);
  max-width: 520px;
  margin: 1.5rem auto;
}

/* ─── Loading spinner ─────────────────────────────────── */
.fp-loading {
  display: flex;
  justify-content: center;
  padding: 2rem;
}
.fp-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--fp-border);
  border-top-color: var(--fp-primary);
  border-radius: 50%;
  animation: fp-spin .7s linear infinite;
}
@keyframes fp-spin { to { transform: rotate(360deg); } }

/* ─── Inner card ──────────────────────────────────────── */
.fp-inner {
  background: var(--fp-surface);
  border-radius: var(--fp-radius);
  border: 1.5px solid var(--fp-border);
  box-shadow: var(--fp-shadow);
  overflow: hidden;
  animation: fp-fadein .4s ease;
}
@keyframes fp-fadein { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

/* ─── Header ──────────────────────────────────────────── */
.fp-header {
  padding: .6rem 1.2rem;
  background: linear-gradient(90deg, var(--fp-primary), var(--fp-accent));
  display: flex;
  align-items: center;
}
.fp-tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}

/* ─── Question ────────────────────────────────────────── */
.fp-question {
  margin: 0;
  padding: 1.2rem 1.4rem .9rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fp-text);
  line-height: 1.4;
}

/* ─── Options ─────────────────────────────────────────── */
.fp-options {
  padding: 0 1rem 1rem;
  display: grid;
  gap: .55rem;
}

.fp-option {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .75rem 1rem;
  background: #f9fafb;
  border: 1.5px solid var(--fp-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all .18s ease;
  font-family: var(--fp-font);
  font-size: .95rem;
  color: var(--fp-text);
  text-align: left;
}
.fp-option:hover:not(:disabled) {
  border-color: var(--fp-primary);
  background: #fff5f2;
  transform: translateX(3px);
}
.fp-option:disabled { cursor: default; }
.fp-option.fp-dimmed { opacity: .45; }
.fp-option.fp-selected {
  border-color: var(--fp-primary);
  background: #fff5f2;
  opacity: 1 !important;
}
.fp-opt-emoji { font-size: 1.4rem; flex-shrink: 0; }
.fp-opt-label { flex: 1; }

/* ─── Results ─────────────────────────────────────────── */
.fp-result-area { padding: 0 1rem 1rem; }

.fp-results-title {
  font-size: .82rem;
  color: var(--fp-muted);
  margin: 0 0 .7rem;
}

.fp-result-row {
  display: grid;
  grid-template-columns: 1.6rem 1fr auto auto;
  align-items: center;
  gap: .4rem .6rem;
  margin-bottom: .55rem;
}
.fp-result-row.fp-result-chosen .fp-res-label { font-weight: 700; color: var(--fp-primary); }
.fp-res-emoji { font-size: 1.1rem; text-align: center; }
.fp-res-label { font-size: .88rem; color: var(--fp-text); }
.fp-bar-wrap {
  grid-column: 2 / 3;
  grid-row: 2;
  height: 8px;
  background: #f0f0f0;
  border-radius: 99px;
  overflow: hidden;
}
.fp-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--fp-primary), var(--fp-accent));
  border-radius: 99px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.fp-result-chosen .fp-bar { background: linear-gradient(90deg, #ff4f1f, #ff8c42); }
.fp-res-pct { font-size: .8rem; font-weight: 700; color: var(--fp-muted); grid-row: 2; }
.fp-chosen-mark { font-size: .7rem; background: var(--fp-primary); color: #fff; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }

/* ─── Thank you ───────────────────────────────────────── */
.fp-thankyou {
  text-align: center;
  padding: 1.4rem;
}
.fp-ty-icon { font-size: 2.5rem; margin-bottom: .4rem; }
.fp-thankyou p { margin: 0 0 .3rem; font-size: .95rem; }
.fp-badge-row { font-size: .82rem; color: var(--fp-muted); }

/* ─── Footer ──────────────────────────────────────────── */
.fp-footer {
  padding: .6rem 1.2rem .9rem;
  border-top: 1px solid var(--fp-border);
}
.fp-footer-note {
  font-size: .74rem;
  color: var(--fp-muted);
  display: block;
  margin-bottom: .5rem;
}

/* ─── Share buttons ───────────────────────────────────── */
.fp-share {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.fp-share-btn {
  display: inline-block;
  padding: .35rem .8rem;
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  transition: opacity .15s;
}
.fp-share-btn:hover { opacity: .85; color: #fff; }
.fp-wa { background: #25d366; }
.fp-tw { background: #1d9bf0; }
.fp-fb { background: #1877f2; }

/* ─── Expired ─────────────────────────────────────────── */
.fp-expired { padding: 1.2rem; text-align: center; }
.fp-expired-msg { color: var(--fp-muted); font-size: .9rem; }

/* ─── Error ───────────────────────────────────────────── */
.fp-error { color: #dc2626; font-size: .88rem; }

/* ═══ Estilos temáticos ══════════════════════════════════ */

/* Neon */
.fp-style-neon {
  --fp-primary:  #0ff;
  --fp-accent:   #f0f;
  --fp-dark:     #0a0a0a;
  --fp-surface:  #111;
  --fp-text:     #e0e0e0;
  --fp-border:   #333;
  --fp-muted:    #888;
  background: #111;
}
.fp-style-neon .fp-option { background: #1a1a1a; color: #e0e0e0; }
.fp-style-neon .fp-option:hover:not(:disabled) { border-color: #0ff; background: #0a1a1a; }
.fp-style-neon .fp-bar-wrap { background: #333; }
.fp-style-neon .fp-bar { background: linear-gradient(90deg, #0ff, #f0f); }
.fp-style-neon .fp-footer { border-color: #333; }
.fp-style-neon .fp-question { color: #e0e0e0; }
.fp-style-neon .fp-header { background: linear-gradient(90deg, #0ff4, #f0f4); }
.fp-style-neon .fp-tag { color: #fff; text-shadow: 0 0 8px #0ff; }

/* Minimal */
.fp-style-minimal {
  --fp-primary:  #111;
  --fp-accent:   #555;
  --fp-radius:   4px;
  --fp-shadow:   none;
}
.fp-style-minimal .fp-header { background: #111; }
.fp-style-minimal .fp-option { border-radius: 4px; }
.fp-style-minimal .fp-bar { background: #111; }
.fp-style-minimal .fp-share-btn.fp-wa { background: #111; }

/* Card */
.fp-style-card .fp-inner {
  box-shadow: 0 8px 40px rgba(0,0,0,.14);
  border-radius: 20px;
}
.fp-style-card .fp-option { border-radius: 14px; }
