/*
 * Design templates of the public form (settings.design).
 *
 * Classes sit on <body> of view.php and on #previewModalBody in the builder, so every
 * rule names both the live form (.fv-*) and the builder preview (.forms-preview-*).
 * "classic" + "neutral" + no accent is the original look: it adds no rules at all.
 */

/* ── Accent color ────────────────────────────────────────────────────────────
   The theme is compiled with fixed colors for buttons and checkboxes, so they need
   their own rules; everything else follows --phoenix-primary (set inline). */
.fv-accent .btn-primary,
.fv-accent .btn-primary:focus {
    background-color: var(--fv-accent) !important;
    border-color: var(--fv-accent) !important;
    color: var(--fv-accent-contrast) !important;
}

.fv-accent .btn-primary:hover,
.fv-accent .btn-primary:active {
    background-color: var(--fv-accent-hover) !important;
    border-color: var(--fv-accent-hover) !important;
    color: var(--fv-accent-contrast) !important;
}

.fv-accent .btn-phoenix-primary {
    color: var(--fv-accent) !important;
}

.fv-accent .btn-phoenix-primary:hover {
    background-color: var(--fv-accent) !important;
    border-color: var(--fv-accent) !important;
    color: var(--fv-accent-contrast) !important;
}

.fv-accent .form-check-input:checked {
    background-color: var(--fv-accent) !important;
    border-color: var(--fv-accent) !important;
}

.fv-accent .form-check-input:focus,
.fv-accent .form-control:focus,
.fv-accent .form-select:focus {
    border-color: var(--fv-accent) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--fv-accent-rgb), 0.25) !important;
}

/* The slider thumb is a browser-internal element: a variable only inherited from
   <body> doesn't reach it, so the color is declared on the slider itself */
.fv-accent .form-range {
    --fv-range-thumb: var(--fv-accent);
}

.fv-accent .form-range::-webkit-slider-thumb {
    background: var(--fv-range-thumb) !important;
}

.fv-accent .form-range::-moz-range-thumb {
    background: var(--fv-range-thumb) !important;
}

.fv-accent .fv-content-field a,
.fv-accent .forms-preview-steps a:not(.btn) {
    color: var(--fv-accent);
}

/* ── Modern: rounder, airier, floating card ──────────────────────────────── */
.fv-design-modern .fv-card,
.fv-design-modern .forms-preview-steps,
.fv-design-modern .forms-preview-nav {
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] .fv-design-modern .fv-card,
[data-bs-theme="dark"] .fv-design-modern .forms-preview-steps,
[data-bs-theme="dark"] .fv-design-modern .forms-preview-nav {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.fv-design-modern .fv-card {
    border-radius: 1.25rem;
}

.fv-design-modern .forms-preview-steps {
    border-top-left-radius: 1.25rem !important;
    border-top-right-radius: 1.25rem !important;
}

.fv-design-modern .forms-preview-nav {
    border-bottom-left-radius: 1.25rem !important;
    border-bottom-right-radius: 1.25rem !important;
}

.fv-design-modern .fv-header,
.fv-design-modern .forms-preview-header {
    border-bottom-color: transparent;
    padding-top: 2rem;
}

.fv-design-modern .fv-nav {
    border-top-color: transparent;
}

.fv-design-modern .fv-body-inner .form-label,
.fv-design-modern .forms-preview-steps .form-label {
    text-transform: none;
    letter-spacing: 0;
}

.fv-design-modern .fv-body-inner .form-control,
.fv-design-modern .fv-body-inner .form-select,
.fv-design-modern .fv-body-inner .choices__inner,
.fv-design-modern .forms-preview-steps .form-control,
.fv-design-modern .forms-preview-steps .form-select {
    border-radius: 0.75rem;
}

.fv-design-modern .fv-nav .btn,
.fv-design-modern .forms-preview-nav .btn {
    border-radius: 999px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ── Minimal: no card, no frames, underlined inputs ──────────────────────── */
.fv-design-minimal .fv-bg {
    background: var(--phoenix-body-bg);
}

.fv-design-minimal .fv-card,
.fv-design-minimal .forms-preview-steps,
.fv-design-minimal .forms-preview-nav {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.fv-design-minimal .fv-header,
.fv-design-minimal .forms-preview-header {
    border-bottom-color: transparent;
    text-align: left !important;
}

.fv-design-minimal .fv-nav {
    border-top-color: transparent;
}

.fv-design-minimal .fv-body-inner .form-control,
.fv-design-minimal .fv-body-inner .form-select,
.fv-design-minimal .fv-body-inner .choices__inner,
.fv-design-minimal .forms-preview-steps .form-control,
.fv-design-minimal .forms-preview-steps .form-select {
    border-width: 0 0 1.5px 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}

/* The phone input keeps its left padding: the country picker sits there */
.fv-design-minimal .fv-body-inner .form-control:not(.iti__tel-input),
.fv-design-minimal .forms-preview-steps .form-control:not(.iti__tel-input) {
    padding-left: 0;
}

.fv-design-minimal .fv-body-inner .form-control:focus,
.fv-design-minimal .fv-body-inner .form-select:focus,
.fv-design-minimal .forms-preview-steps .form-control:focus,
.fv-design-minimal .forms-preview-steps .form-select:focus {
    box-shadow: none !important;
    border-bottom-color: var(--phoenix-primary) !important;
}

.fv-design-minimal .fv-nav .btn,
.fv-design-minimal .forms-preview-nav .btn {
    border-radius: 0.25rem;
}

/* ── Compact: denser, for long forms ─────────────────────────────────────── */
.fv-design-compact .fv-body-inner {
    padding: 1rem 1.25rem;
    font-size: 1rem;
}

.fv-design-compact .forms-preview-steps {
    padding: 1rem;
}

.fv-design-compact .fv-header {
    padding: 1rem 1.25rem 0.75rem;
}

.fv-design-compact .fv-nav,
.fv-design-compact .forms-preview-nav {
    padding: 0.75rem 1.25rem;
}

.fv-design-compact .fv-body-inner .mb-3,
.fv-design-compact .forms-preview-steps .mb-3 {
    margin-bottom: 0.6rem !important;
}

.fv-design-compact .fv-body-inner .form-label,
.fv-design-compact .forms-preview-steps .form-label {
    margin-bottom: 0.25rem;
}

.fv-design-compact .fv-body-inner .form-control-lg,
.fv-design-compact .fv-body-inner .form-select-lg {
    padding: 0.45rem 0.75rem;
    font-size: 1rem;
}

.fv-design-compact .fv-nav .btn-lg {
    padding: 0.45rem 1rem;
    font-size: 1rem;
}

/* ── Background behind the card (after the presets, so it always wins) ───── */
.fv-bg-tint .fv-bg,
#previewModalBody.fv-bg-tint {
    background: rgba(var(--phoenix-primary-rgb), 0.08);
}

.fv-bg-gradient .fv-bg,
#previewModalBody.fv-bg-gradient {
    background: linear-gradient(160deg,
            rgba(var(--phoenix-primary-rgb), 0.22) 0%,
            rgba(var(--phoenix-primary-rgb), 0.06) 45%,
            var(--phoenix-body-highlight-bg) 100%);
}
