/* =========================================================
   SCHEME + RESET (prevents theme CSS bleed)
   ========================================================= */

.scf-form, .scf-form * { box-sizing: border-box; }

.scf-form {
  /* isolate typography + colors from the theme */
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.35;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--scf-text);
}

.scf-form :where(h1,h2,h3,h4,h5,h6,p,ul,ol,li,figure,blockquote){ margin: 0; padding: 0; }
.scf-form :where(ul,ol){ list-style: none; }

.scf-form :where(button,input,textarea,select){
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  outline: none;
}

.scf-form :where(a){ color: inherit; text-decoration: none; }
.scf-form :where(button){ cursor: pointer; }
.scf-form :where(img,svg){ display:block; max-width:100%; }

.scf-form .scf-btn{
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.scf-form .scf-input{
  all: unset;
  box-sizing: border-box;
  display:block;
  width: 100%;
}

.scf-form .scf-option{
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display:flex;
  align-items:center;
  gap: 12px;
}

/* Built-in color schemes (independent of theme styles) */
.scf-form.scf-scheme-light{
  --scf-primary:#111;
  --scf-bg:#ffffff;
  --scf-text:#111827;
  --scf-muted:#6b7280;
  --scf-border: rgba(17,24,39,0.14);
  --scf-card-border: rgba(17,24,39,0.10);
  --scf-input-bg:#ffffff;
  --scf-progress-bg: rgba(17,24,39,0.06);
  --scf-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.scf-form.scf-scheme-dark{
  --scf-primary:#ffffff;
  --scf-bg:#0b0c0f;
  --scf-text:#f3f4f6;
  --scf-muted:#a1a1aa;
  --scf-border: rgba(255,255,255,0.18);
  --scf-card-border: rgba(255,255,255,0.14);
  --scf-input-bg:#0f1116;
  --scf-progress-bg: rgba(255,255,255,0.12);
  --scf-shadow: 0 14px 40px rgba(0,0,0,.55);
}

/* Ensure card + progress always use scheme variables */
.scf-card{ background: var(--scf-bg) !important; border-color: var(--scf-card-border, var(--scf-border)); }
.scf-title, .scf-q, .scf-sub, .scf-muted{ color: var(--scf-text); }
.scf-sub, .scf-muted{ color: var(--scf-muted); }
.scf-progress{ background: var(--scf-progress-bg); }
.scf-theme-dark .scf-progress{ background: var(--scf-progress-bg); }

/* =========================================================
   Strong field/button paint (override theme interference)
   ========================================================= */
.scf-form.scf-scheme-light :where(input.scf-input, textarea.scf-input, select.scf-input){
  background: var(--scf-input-bg) !important;
  color: var(--scf-text) !important;
  border: 1px solid var(--scf-border) !important;
}
.scf-form.scf-scheme-dark :where(input.scf-input, textarea.scf-input, select.scf-input){
  background: var(--scf-input-bg) !important;
  color: var(--scf-text) !important;
  border: 1px solid var(--scf-border) !important;
}

.scf-form :where(input.scf-input, textarea.scf-input, select.scf-input)::placeholder{
  color: var(--scf-muted) !important;
  opacity: 1 !important;
}

.scf-form :where(.scf-card, .scf-step, .scf-actions, .scf-progress, .scf-title, .scf-q, .scf-sub, .scf-muted){
  opacity: 1 !important;
  filter: none !important;
  mix-blend-mode: normal !important;
}

.scf-form .scf-btn.primary{
  background: var(--scf-primary) !important;
  color: var(--scf-bg) !important;
  border: 1px solid rgba(0,0,0,0) !important;
}
.scf-form.scf-scheme-dark .scf-btn.primary{
  background: #ffffff !important;
  color: #0b0c0f !important;
}
.scf-form .scf-btn.secondary{
  background: transparent !important;
  color: var(--scf-text) !important;
  border: 1px solid var(--scf-border) !important;
}



/* Frontend conversational form — Slick Convo Forms (v1.4.0) */
.scf-form { 
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --scf-primary: #111;
  --scf-bg: #fff;
  --scf-text: #111;
  --scf-border: rgba(0,0,0,0.12);
  --scf-input-bg: #fff;
  --scf-radius: 16px;
  --scf-shadow: 0 10px 30px rgba(0,0,0,.06);
  --scf-font-head: inherit;
  --scf-font-body: inherit;
}

.scf-form * { box-sizing: border-box; }

.scf-card { 
  max-width: 760px; margin: 22px auto; 
  border: 1px solid var(--scf-border);
  border-radius: var(--scf-radius); 
  padding: 32px; 
  background: var(--scf-bg); 
  box-shadow: var(--scf-shadow); 
  overflow: hidden; 
  position: relative;
  transition: all 0.3s ease;
}

.scf-header { display:flex; flex-direction:column; gap:10px; margin-bottom: 24px; }
.scf-title { font-family: var(--scf-font-head); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--scf-text); }

.scf-progress { height: 6px; background: var(--scf-progress-bg); border-radius: 99px; overflow:hidden; }
.scf-progress-bar { height: 100%; background: var(--scf-primary); width: 0%; transition: width .4s cubic-bezier(0.22, 1, 0.36, 1); }

.scf-body { min-height: 300px; display:flex; flex-direction:column; justify-content:center; position:relative; }
.scf-step { will-change: transform, opacity; width: 100%; }

/* Animations */
.anim-slide-in { animation: scfSlideIn .4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.anim-slide-out { animation: scfSlideOut .3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.anim-fade-in { animation: scfFadeIn .3s ease both; }
.anim-fade-out { animation: scfFadeOut .2s ease both; }

@keyframes scfSlideIn { from { opacity:0; transform: translateY(14px) scale(0.98); } to { opacity:1; transform: translateY(0) scale(1); } }
@keyframes scfSlideOut { from { opacity:1; transform: translateY(0) scale(1); } to { opacity:0; transform: translateY(-14px) scale(0.98); } }
@keyframes scfFadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes scfFadeOut { from { opacity:1; } to { opacity:0; } }

.scf-q { font-family: var(--scf-font-head); font-size: 24px; font-weight: 650; line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 12px; color: var(--scf-text); }
.scf-sub { font-family: var(--scf-font-body); font-size: 15px; color: var(--scf-text); opacity: 0.65; margin-bottom: 24px; line-height: 1.5; }
.scf-required { color: #ef4444; font-weight: normal; font-size: 0.8em; vertical-align: top; }

.scf-input-wrap { margin-bottom: 12px; }

.scf-input, select, textarea, input[type="file"] {
  width: 100%;
  font-family: var(--scf-font-body);
  border: 1px solid var(--scf-border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 17px;
  outline: none;
  background: var(--scf-input-bg);
  color: var(--scf-text);
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.scf-input:focus { border-color: var(--scf-primary); box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
.scf-input::placeholder { opacity: 0.4; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

.scf-actions { display:flex; gap:12px; align-items:center; margin-top: 28px; flex-wrap:wrap; }

.scf-btn {
  display: inline-block;
  text-decoration: none;
  border: 1px solid transparent;
  background: var(--scf-primary);
  color: #fff;
  border-radius: 99px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.scf-btn:hover { opacity: 0.95; transform: translateY(-1px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.scf-btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.scf-btn:disabled { opacity: 0.5; cursor: not-allowed; transform:none; }

.scf-btn.secondary { background: transparent; border-color: var(--scf-border); color: var(--scf-text); box-shadow: none; }
.scf-btn.secondary:hover { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.2); }

.scf-hint { font-size: 12px; color: var(--scf-text); opacity: 0.5; margin-left: auto; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.scf-error { font-size: 13px; color: #ef4444; margin-top: 8px; font-weight: 500; display:flex; align-items:center; gap:6px; }
.scf-error::before { content:"!"; display:inline-flex; width:16px; height:16px; border-radius:50%; background:#ef4444; color:#fff; font-size:10px; font-weight:800; align-items:center; justify-content:center; }

/* Options (Radio/Checkbox) */
.scf-options { display: flex; flex-direction: column; gap: 10px; }
.scf-option { 
  display:flex; gap:14px; align-items:center; 
  padding: 16px 18px; 
  border: 1px solid var(--scf-border); 
  border-radius: 12px; 
  cursor:pointer; 
  background: var(--scf-input-bg);
  color: var(--scf-text);
  text-align: left;
  transition: all 0.2s;
  font-size: 16px;
}
.scf-option:hover { background: rgba(0,0,0,0.015); border-color: rgba(0,0,0,0.25); transform: translateY(-1px); }
.scf-option.on { background: rgba(0,0,0,0.04); border-color: var(--scf-primary); font-weight: 500; box-shadow: 0 0 0 1px var(--scf-primary); transform: translateY(0); }
.scf-option .chk { 
  width: 22px; height: 22px; border: 2px solid var(--scf-border); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
}
.scf-option.on .chk { border-color: var(--scf-primary); }
.scf-option.on .chk::after { content:""; width: 10px; height: 10px; background: var(--scf-primary); border-radius: 50%; }

/* Checkbox specific square style */
.scf-option input[type="checkbox"] ~ .chk { border-radius: 6px; } 
.scf-option.on input[type="checkbox"] ~ .chk::after { border-radius: 2px; }

.scf-success { font-size: 24px; font-weight: 700; color: #10b981; margin-bottom: 12px; text-align: center; }
.scf-honeypot { position:absolute; opacity:0; pointer-events:none; width:0; height:0; }

/* ==========================================================================
   THEMES
   ========================================================================== */

/* === THEME: CLASSIC === */
/* Clean, Apple-esque, professional */
.scf-theme-classic {
  --scf-radius: 20px;
  --scf-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
  --scf-border: #e2e8f0;
}
.scf-theme-classic .scf-card { padding: 40px; }


/* === THEME: TYPEFORM (Immersive) === */
/* Full-width feel, large type, minimal chrome */
.scf-theme-typeform {
  --scf-bg: transparent;
  --scf-shadow: none;
  --scf-border: transparent;
}
.scf-theme-typeform .scf-card { 
  padding: 0; 
  max-width: 680px;
  background: transparent;
}
.scf-theme-typeform .scf-progress { 
  height: 4px; 
  margin-bottom: 40px;
  background: rgba(0,0,0,0.1);
}
.scf-theme-typeform .scf-q { 
  font-size: 32px; 
  font-weight: 300; 
  margin-bottom: 24px;
}
.scf-theme-typeform .scf-input {
  border: 0;
  border-bottom: 2px solid rgba(0,0,0,0.15);
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  font-size: 28px;
  box-shadow: none;
}
.scf-theme-typeform .scf-input:focus {
  border-bottom-color: var(--scf-primary);
  box-shadow: none;
}
.scf-theme-typeform .scf-option {
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.scf-theme-typeform .scf-option.on {
  background: var(--scf-primary);
  color: #fff;
  border-color: var(--scf-primary);
}
.scf-theme-typeform .scf-option.on .chk { border-color: #fff; }
.scf-theme-typeform .scf-option.on .chk::after { background: #fff; }


/* === THEME: AIRY === */
/* Soft, playful, lots of whitespace */
.scf-theme-airy {
  --scf-radius: 32px;
  --scf-shadow: 0 24px 80px -12px rgba(50, 50, 93, 0.15);
  --scf-border: #f0f2f5;
  --scf-bg: #fff;
}
.scf-theme-airy .scf-card { 
  padding: 56px; 
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}
.scf-theme-airy .scf-q { 
  font-size: 36px; 
  font-weight: 800; 
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.scf-theme-airy .scf-sub {
  font-size: 18px;
  margin-bottom: 32px;
}
.scf-theme-airy .scf-input { 
  font-size: 22px; 
  padding: 20px 24px; 
  border-radius: 16px; 
  background: #f1f5f9; 
  border-color: transparent; 
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
}
.scf-theme-airy .scf-input:focus { 
  background: #fff; 
  border-color: var(--scf-primary); 
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.scf-theme-airy .scf-btn {
  padding: 16px 32px;
  font-size: 18px;
}


/* === THEME: DARK === */
/* High contrast, futuristic */
.scf-theme-dark {
  --scf-bg: #000;
  --scf-text: #fff;
  --scf-border: #333;
  --scf-input-bg: #111;
  --scf-primary: #fff;
  --scf-shadow: 0 0 0 1px #333;
}
.scf-theme-dark .scf-card {
  border: 1px solid #333;
  background: #000;
}
.scf-theme-dark .scf-btn { color: #000; background: #fff; }
.scf-theme-dark .scf-btn:hover { background: #e5e5e5; }
.scf-theme-dark .scf-btn.secondary { color: #fff; background: transparent; border-color: #444; }
.scf-theme-dark .scf-progress { background: #333; }
.scf-theme-dark .scf-input { border-color: #333; color: #fff; }
.scf-theme-dark .scf-input:focus { border-color: #fff; background: #000; }
.scf-theme-dark .scf-option { border-color: #333; background: #111; }
.scf-theme-dark .scf-option:hover { background: #222; border-color: #666; }
.scf-theme-dark .scf-option.on { background: #fff; color:#000; border-color: #fff; }
.scf-theme-dark .scf-option.on .chk { border-color: #000; }
.scf-theme-dark .scf-option.on .chk::after { background: #000; }
.scf-theme-dark .scf-error { color: #ff6b6b; }
.scf-theme-dark .scf-error::before { background: #ff6b6b; color:#000; }


/* === THEME: GLASS === */
/* Frosted glass effect */
.scf-theme-glass {
  --scf-bg: rgba(255, 255, 255, 0.65);
  --scf-text: #0f172a;
  --scf-border: rgba(255, 255, 255, 0.4);
  --scf-input-bg: rgba(255, 255, 255, 0.5);
  --scf-primary: #3b82f6;
  --scf-radius: 24px;
}
.scf-theme-glass .scf-card {
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}
.scf-theme-glass .scf-btn { 
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); 
  color: #fff; 
  box-shadow: 0 4px 15px rgba(37,99,235,0.3); 
}
.scf-theme-glass .scf-progress-bar { 
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%); 
}
.scf-theme-glass .scf-option.on {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #1e40af;
}


/* === THEME: COMPACT === */
/* Dense, information-rich, good for sidebars */
.scf-density-compact { --scf-radius: 8px; }
.scf-density-compact .scf-card { padding: 20px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.scf-density-compact .scf-q { font-size: 18px; margin-bottom: 8px; }
.scf-density-compact .scf-sub { font-size: 13px; margin-bottom: 12px; }
.scf-density-compact .scf-input { padding: 8px 12px; font-size: 14px; border-radius: 6px; }
.scf-density-compact .scf-btn { padding: 8px 16px; font-size: 13px; }
.scf-density-compact .scf-option { padding: 8px 12px; font-size: 14px; border-radius: 6px; }


/* Responsive Tweaks */
@media (max-width: 640px) {
  .scf-theme-airy .scf-card { padding: 24px; }
  .scf-theme-airy .scf-q { font-size: 26px; }
  .scf-theme-typeform .scf-q { font-size: 24px; }
  .scf-theme-typeform .scf-input { font-size: 22px; }
  .scf-q { font-size: 22px; }
}

/* All Fields Mode - Cleanup */
.scf-all-stack { display:flex; flex-direction:column; gap: 24px; }
.scf-all-label { font-weight: 600; margin-bottom: 8px; font-size: 16px; color: var(--scf-text); }
.scf-all-q { font-size: 16px; }
.scf-section { font-size: 20px; font-weight: 700; padding-top: 24px; margin-top: 12px; border-top: 1px solid var(--scf-border); opacity: 0.8; }
