/* ── Fluency First Opt-In v1.0 ── */

/* ── Shared form styles ───────────────────────────── */
.ffoi-form-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ffoi-heading {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.ffoi-subheading {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  margin: 0 0 16px;
  line-height: 1.5;
}

.ffoi-fields {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ffoi-field { flex: 1; min-width: 160px; }

.ffoi-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 9px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.18s, background 0.18s;
  font-family: inherit;
}

.ffoi-input::placeholder { color: rgba(255,255,255,0.5); }

.ffoi-input:focus {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.18);
}

.ffoi-btn {
  padding: 12px 22px;
  background: #f5a623;
  color: #1a1a2e;
  border: none;
  border-radius: 9px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.ffoi-btn:hover:not(:disabled) {
  background: #e09410;
  transform: translateY(-1px);
}

.ffoi-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ffoi-privacy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  margin: 8px 0 0;
}

.ffoi-msg { font-size: 0.85rem; margin-top: 8px; }
.ffoi-msg--error { color: #ffb3b3; }
.ffoi-msg--success { color: #b3ffcc; }

/* ── Success state ────────────────────────────────── */
.ffoi-success {
  text-align: center;
  padding: 8px 0;
}

.ffoi-success-icon { font-size: 2rem; display: block; margin-bottom: 8px; }

.ffoi-success-msg {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}

.ffoi-success-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

/* ── Inline / shortcode form ──────────────────────── */
.ffoi-ctx-shortcode .ffoi-form-inner,
.ffoi-ctx-inline .ffoi-form-inner {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d3555 100%);
  border-radius: 16px;
  padding: 32px 28px;
}

/* ── Blog post banner ─────────────────────────────── */
.ffoi-ctx-banner {
  margin-top: 40px;
  border-top: 2px solid #f0f2f8;
  padding-top: 32px;
}

.ffoi-ctx-banner .ffoi-form-inner {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d3555 100%);
  border-radius: 16px;
  padding: 28px 28px 22px;
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.ffoi-ctx-banner .ffoi-form-text { flex: 1; min-width: 220px; }
.ffoi-ctx-banner .ffoi-form      { flex: 2; min-width: 280px; }

.ffoi-ctx-banner .ffoi-heading {
  font-size: 1.1rem;
}

/* ── Popup overlay ────────────────────────────────── */
.ffoi-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
  transition: opacity 0.25s;
}

.ffoi-popup-overlay.ffoi-hidden  { display: none; }
.ffoi-popup-overlay.ffoi-visible { display: flex; animation: ffoi-fade-in 0.25s ease; }

@keyframes ffoi-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ffoi-popup {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d3555 100%);
  border-radius: 18px;
  padding: 40px 36px 32px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  animation: ffoi-slide-up 0.28s ease;
}

@keyframes ffoi-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.ffoi-popup-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.3rem;
  line-height: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.ffoi-popup-close:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.ffoi-ctx-popup .ffoi-heading    { font-size: 1.35rem; }
.ffoi-ctx-popup .ffoi-subheading { margin-bottom: 20px; }

/* ── Admin styles (loaded separately) ─────────────── */

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  .ffoi-ctx-banner .ffoi-form-inner { flex-direction: column; padding: 22px 18px; }
  .ffoi-ctx-shortcode .ffoi-form-inner { padding: 24px 18px; }
  .ffoi-fields { flex-direction: column; }
  .ffoi-field  { width: 100%; min-width: unset; }
  .ffoi-btn    { width: 100%; text-align: center; }
  .ffoi-popup  { padding: 32px 20px 24px; }
  .ffoi-ctx-popup .ffoi-heading { font-size: 1.1rem; }
}
