/* ── Reset / Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Wrapper ─────────────────────────────────────────────────── */
.ftvf-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #eef3f7;
    padding: 20px;
}

/* ── Card ────────────────────────────────────────────────────── */
.ftvf-card {
    background: none !important;
    border-radius: 12px;
    padding: 32px 32px 28px;
    width: 100%;
    max-width: 640px;
    color: #1e293b;
    box-shadow: none !important;
}

/* ── Heading ─────────────────────────────────────────────────── */
.ftvf-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0d3880;
    margin: 0 0 0px;
    line-height: 1.4;
}

/* ── Two-column row ──────────────────────────────────────────── */
.ftvf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Field ───────────────────────────────────────────────────── */
.ftvf-field {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
}

.ftvf-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
}

/* ── Inputs ──────────────────────────────────────────────────── */
.ftvf-field input[type="text"],
.ftvf-field input[type="email"],
.ftvf-phone-number {
    width: 100%;
    padding: 9px 12px;
    background: #fff;
    border: 1.5px solid #c8d4e3;
    border-radius: 6px;
    color: #1e293b;
    font-size: 0.90rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: inherit;
}

.ftvf-field input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.ftvf-field input.ftvf-invalid,
.ftvf-phone-row.ftvf-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.10) !important;
}

/* ── Select wrapper ──────────────────────────────────────────── */
.ftvf-select-wrap {
    position: relative;
}

.ftvf-select-wrap select {
    width: 100%;
    padding: 9px 34px 9px 12px;
    background: #fff;
    border: 1.5px solid #c8d4e3;
    border-radius: 6px;
    color: #9ca3af;
    font-size: 0.90rem;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ftvf-select-wrap select.has-value { color: #1e293b; }

.ftvf-select-wrap select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.ftvf-select-wrap select.ftvf-invalid { border-color: #ef4444; }

.ftvf-select-arrow {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.65rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 3px;
}

.ftvf-check-icon {
    color: #2563eb;
    font-size: 0.80rem;
    display: none;
}

.ftvf-select-wrap.has-value .ftvf-check-icon { display: inline; }

/* ── Phone field ─────────────────────────────────────────────── */
.ftvf-phone-row {
    display: flex;
    align-items: stretch;
    border: 1.5px solid #c8d4e3;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}

.ftvf-phone-row:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.ftvf-dial-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ftvf-dial-wrap select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-right: 1.5px solid #c8d4e3;
    border-radius: 0;
    background: #fff;
    padding: 9px 22px 9px 32px;
    font-size: 0.88rem;
    color: #374151;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}

.ftvf-dial-flag {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: block;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.ftvf-dial-arrow {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.60rem;
    color: #6b7280;
}

.ftvf-phone-number {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 9px 12px;
    font-size: 0.90rem;
    color: #1e293b;
    outline: none;
    background: transparent;
    font-family: inherit;
}

/* ── Inline errors ───────────────────────────────────────────── */
.ftvf-err {
    display: block;
    font-size: 0.73rem;
    color: #ef4444;
    margin-top: 3px;
    min-height: 14px;
}

/* ── Privacy note ────────────────────────────────────────────── */
.ftvf-privacy {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 4px 0 14px;
    line-height: 1.5;
}

.ftvf-privacy a {
    color: #2563eb;
    text-decoration: underline;
}

/* ── Submit button ───────────────────────────────────────────── */
#ftvf-submit {
    width: 100%;
    padding: 13px 16px;
    background: #1e73d1;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.98rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.01em;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#ftvf-submit:hover  { background: #1658a8; }
#ftvf-submit:active { transform: scale(0.99); }
#ftvf-submit:disabled { opacity: 0.65; cursor: not-allowed; }

.ftvf-btn-loader { display: none; align-items: center; gap: 5px; }
.ftvf-btn-loader span {
    width: 7px; height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: ftvf-bounce 0.9s infinite alternate;
}
.ftvf-btn-loader span:nth-child(2) { animation-delay: 0.15s; }
.ftvf-btn-loader span:nth-child(3) { animation-delay: 0.30s; }

@keyframes ftvf-bounce {
    from { opacity: 0.3; transform: translateY(0); }
    to   { opacity: 1;   transform: translateY(-4px); }
}

/* ── Server error ────────────────────────────────────────────── */
.ftvf-server-error {
    text-align: center;
    font-size: 0.82rem;
    color: #ef4444;
    margin-top: 8px;
}

/* ── Success card ────────────────────────────────────────────── */
.ftvf-success-card {
    text-align: center;
    padding: 24px 16px;
    animation: ftvf-fade 0.4s ease;
    display: none;
}

.ftvf-success-icon { font-size: 2.8rem; margin-bottom: 12px; display: block; }
.ftvf-success-card h4 { font-size: 1.2rem; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.ftvf-success-card p  { font-size: 0.88rem; color: #64748b; line-height: 1.55; margin: 0; }

/* ── Returning visitor card ──────────────────────────────────── */
.ftvf-return-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px 24px;
    width: 100%;
    max-width: 640px;
    text-align: center;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ftvf-return-card h3  { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin: 0 0 8px; }
.ftvf-return-card p   { font-size: 0.88rem; color: #64748b; line-height: 1.6; margin: 0; }
.ftvf-return-icon     { font-size: 2.8rem; margin-bottom: 12px; display: block; }

/* ── Fade animation ──────────────────────────────────────────── */
@keyframes ftvf-fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 520px) {
    .ftvf-card { padding: 22px 16px 20px; border-radius: 10px; }
    .ftvf-row  { grid-template-columns: 1fr; gap: 0; }
    .ftvf-heading { font-size: 1.05rem; }
}

/* ── Message textarea & full-width field ─────────────────────── */
.ftvf-field-full {
    grid-column: 1 / -1;
}

.ftvf-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.92rem;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    resize: vertical;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-sizing: border-box;
    line-height: 1.5;
}

.ftvf-field textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.ftvf-field textarea.ftvf-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}


/* ── Slider reveal helper ────────────────────────────────────── */
/* Add [data-ftvf-slider] to any slider wrapper you want the plugin
   to reveal after the thank-you message. It will be hidden on page
   load and shown after the 3-second delay. */
[data-ftvf-slider] {
    display: none;
}


.ftvf-recaptcha-wrap {
    margin-bottom: 4px;
}

.ftvf-recaptcha-wrap .ftvf-err {
    display: block;
    margin-top: 4px;
}

/* ── Interest select field ───────────────────────────────────── */
#ftvf-interest {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background-color: #fff;
    font-size: 15px;
    color: #111827;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    line-height: 1.5;
}

#ftvf-interest:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

#ftvf-interest.ftvf-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

/* ── Other text field row (hidden by default) ────────────────── */
#ftvf-other-row {
    display: none;
}
