/* ==========================================================
   Jakin Offerte Aanvraag – Formulier CSS  v1.0.4
   Labels rendered via CSS ::before on CF7's data-name spans.
   No HTML label tags inside the CF7 template.
   ========================================================== */

/* ── Google Fonts fallback (Urbanist loaded by theme) ───── */
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;600;700;800&display=swap');

/* ── Section wrapper ────────────────────────────────────── */
.jk-offerte-section {
    background: linear-gradient(160deg, #0e1c35 0%, #1B2A4A 55%, #112238 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    font-family: 'Urbanist', sans-serif;
    position: relative;
    overflow: hidden;
}

.jk-offerte-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse 700px 500px at 80% 20%, rgba(201,160,23,.06) 0%, transparent 70%),
        radial-gradient(ellipse 500px 400px at 10% 80%, rgba(201,160,23,.04) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Inner container ────────────────────────────────────── */
.jk-offerte-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────── */
.jk-offerte-header {
    text-align: center;
    margin-bottom: 48px;
}

.jk-offerte-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 14px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.jk-offerte-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,.65);
    margin: 0 auto;
    max-width: 480px;
    line-height: 1.6;
}

/* ── Card ───────────────────────────────────────────────── */
.jk-offerte-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    padding: 44px 48px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0,0,0,.35),
                0 1px 0 rgba(255,255,255,.06) inset;
}

/* ── Reset CF7 default styles ───────────────────────────── */
.jk-offerte-card .wpcf7,
.jk-offerte-card .wpcf7 form {
    margin: 0;
}
.jk-offerte-card br {
    display: none; /* CF7 inserts <br> — hide them */
}

/* ==========================================================
   GRID LAYOUT
   CF7 wraps each tag in <span class="wpcf7-form-control-wrap"
   data-name="field-name">. We use those spans as grid cells.
   ========================================================== */

/* ── 2-column grid for the first 4 fields ───────────────── */
.jk-offerte-card .jk-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
    margin-bottom: 24px;
}

/* ── Full-width wrapper for dienst / omschrijving / submit ─ */
.jk-offerte-card .jk-form-full {
    margin-bottom: 24px;
}

/* Make CF7 wrap spans block so ::before labels work ──────── */
.jk-offerte-card .wpcf7-form-control-wrap {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 24px !important;
    box-sizing: border-box !important;
}

.jk-offerte-card .jk-form-grid .wpcf7-form-control-wrap {
    margin-bottom: 0 !important; /* Spacing handled by grid gap */
}

/* ==========================================================
   LABELS via CSS ::before
   CF7 outputs: <span class="wpcf7-form-control-wrap"
                      data-name="jk-naam">
   We target these spans with ::before to inject visible labels.
   ========================================================== */
.jk-offerte-card .wpcf7-form-control-wrap::before {
    display: block;
    font-family: 'Urbanist', sans-serif;
    font-size: 0.685rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.50);
    margin-bottom: 8px;
    order: -1; /* always above the input */
}

/* Individual label texts */
.jk-offerte-card .wpcf7-form-control-wrap[data-name="jk-naam"]::before {
    content: "NAAM \00002A";          /* NAAM * */
}
.jk-offerte-card .wpcf7-form-control-wrap[data-name="jk-telefoon"]::before {
    content: "TELEFOONNUMMER \00002A"; /* TELEFOONNUMMER * */
}
.jk-offerte-card .wpcf7-form-control-wrap[data-name="jk-email"]::before {
    content: "E-MAILADRES";
}
.jk-offerte-card .wpcf7-form-control-wrap[data-name="jk-adres"]::before {
    content: "ADRES KLUS";
}
.jk-offerte-card .wpcf7-form-control-wrap[data-name="jk-dienst"]::before {
    content: "GEWENSTE DIENST";
}
.jk-offerte-card .wpcf7-form-control-wrap[data-name="jk-omschrijving"]::before {
    content: "OMSCHRIJVING";
}

/* ── Required star color ────────────────────────────────── */
.jk-offerte-card .wpcf7-form-control-wrap[data-name="jk-naam"]::before,
.jk-offerte-card .wpcf7-form-control-wrap[data-name="jk-telefoon"]::before {
    color: rgba(255,255,255,.50); /* normal color; * is part of content */
}

/* ==========================================================
   INPUT FIELDS
   ========================================================== */
.jk-cf7-input,
.jk-offerte-card input[type="text"],
.jk-offerte-card input[type="email"],
.jk-offerte-card input[type="tel"],
.jk-offerte-card .wpcf7-text,
.jk-offerte-card .wpcf7-email,
.jk-offerte-card .wpcf7-tel {
    width: 100% !important;
    max-width: 100% !important;
    background: rgba(255,255,255,.07) !important;
    border: 1.5px solid rgba(255,255,255,.12) !important;
    border-radius: 10px !important;
    padding: 13px 16px !important;
    font-size: .95rem !important;
    font-family: 'Urbanist', sans-serif !important;
    color: #fff !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color .2s, background .2s, box-shadow .2s !important;
}

.jk-offerte-card input::placeholder {
    color: rgba(255,255,255,.28) !important;
}

.jk-offerte-card input:focus {
    border-color: rgba(201,160,23,.55) !important;
    background: rgba(255,255,255,.10) !important;
    box-shadow: 0 0 0 3px rgba(201,160,23,.12) !important;
}

/* ==========================================================
   SELECT
   ========================================================== */
.jk-cf7-select,
.jk-offerte-card select,
.jk-offerte-card .wpcf7-select {
    width: 100% !important;
    max-width: 100% !important;
    background-color: rgba(255,255,255,.07) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,.45)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    border: 1.5px solid rgba(255,255,255,.12) !important;
    border-radius: 10px !important;
    padding: 13px 44px 13px 16px !important;
    font-size: .95rem !important;
    font-family: 'Urbanist', sans-serif !important;
    color: rgba(255,255,255,.55) !important;
    outline: none !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    box-sizing: border-box !important;
    transition: border-color .2s, box-shadow .2s !important;
}

.jk-offerte-card select.jk-has-value,
.jk-offerte-card select:not([value=""]):valid {
    color: #fff !important;
}

.jk-offerte-card select option {
    background: #1B2A4A !important;
    color: #fff !important;
}

.jk-offerte-card select:focus {
    border-color: rgba(201,160,23,.55) !important;
    box-shadow: 0 0 0 3px rgba(201,160,23,.12) !important;
}

/* ==========================================================
   TEXTAREA
   ========================================================== */
.jk-cf7-textarea,
.jk-offerte-card textarea,
.jk-offerte-card .wpcf7-textarea {
    width: 100% !important;
    max-width: 100% !important;
    background: rgba(255,255,255,.07) !important;
    border: 1.5px solid rgba(255,255,255,.12) !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    font-size: .95rem !important;
    font-family: 'Urbanist', sans-serif !important;
    color: #fff !important;
    resize: vertical !important;
    min-height: 130px !important;
    outline: none !important;
    box-sizing: border-box !important;
    line-height: 1.6 !important;
    transition: border-color .2s, background .2s, box-shadow .2s !important;
}

.jk-offerte-card textarea::placeholder {
    color: rgba(255,255,255,.28) !important;
}

.jk-offerte-card textarea:focus {
    border-color: rgba(201,160,23,.55) !important;
    background: rgba(255,255,255,.10) !important;
    box-shadow: 0 0 0 3px rgba(201,160,23,.12) !important;
}

/* ── Textarea scrollbar ─────────────────────────────────── */
.jk-offerte-card textarea::-webkit-scrollbar { width: 5px; }
.jk-offerte-card textarea::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: 3px; }
.jk-offerte-card textarea::-webkit-scrollbar-thumb { background: rgba(201,160,23,.40); border-radius: 3px; }

/* ==========================================================
   SUBMIT BUTTON
   ========================================================== */
.jk-offerte-submit,
.jk-offerte-card .wpcf7-submit,
.jk-offerte-card input[type="submit"] {
    display: block !important;
    width: 100% !important;
    padding: 16px 28px !important;
    background: #C9A017 !important;
    color: #fff !important;
    font-family: 'Urbanist', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: .025em !important;
    border: none !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(201,160,23,.35) !important;
    transition: background .25s, transform .15s, box-shadow .25s !important;
}

.jk-offerte-submit:hover,
.jk-offerte-card .wpcf7-submit:hover,
.jk-offerte-card input[type="submit"]:hover {
    background: #E8C224 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 28px rgba(201,160,23,.50) !important;
}

.jk-offerte-submit:active,
.jk-offerte-card .wpcf7-submit:active,
.jk-offerte-card input[type="submit"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 3px 10px rgba(201,160,23,.30) !important;
}

.jk-offerte-card .wpcf7-submit:disabled,
.jk-offerte-card input[type="submit"]:disabled {
    opacity: .65 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* ── Spinner ─────────────────────────────────────────────── */
.jk-offerte-card .wpcf7-spinner {
    vertical-align: middle;
    margin-left: 10px;
    filter: brightness(0) invert(1);
}

/* ==========================================================
   VALIDATION
   ========================================================== */
.jk-offerte-card .wpcf7-not-valid {
    border-color: rgba(220,80,80,.70) !important;
    box-shadow: 0 0 0 3px rgba(220,80,80,.12) !important;
}

.jk-offerte-card .wpcf7-not-valid-tip {
    color: #ff7070;
    font-size: .78rem;
    margin-top: 5px;
    display: block;
}

/* ==========================================================
   RESPONSE MESSAGES
   ========================================================== */
.jk-offerte-card .wpcf7-response-output {
    border: none !important;
    padding: 14px 18px !important;
    border-radius: 10px !important;
    margin: 16px 0 0 !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    font-family: 'Urbanist', sans-serif !important;
}

.jk-offerte-card .wpcf7-mail-sent-ok {
    background: rgba(39,174,96,.15) !important;
    color: #ffffff !important;
    border-left: 3px solid #27ae60 !important;
}

.jk-offerte-card .wpcf7-mail-sent-ng,
.jk-offerte-card .wpcf7-aborted {
    background: rgba(220,80,80,.15) !important;
    color: #ff9090 !important;
    border-left: 3px solid #dc5050 !important;
}

.jk-offerte-card .wpcf7-validation-errors,
.jk-offerte-card .wpcf7-acceptance-missing {
    background: rgba(255,165,0,.12) !important;
    color: #ffc96e !important;
    border-left: 3px solid #ffa500 !important;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 600px) {
    .jk-offerte-card {
        padding: 28px 20px;
    }

    .jk-offerte-card .jk-form-grid {
        grid-template-columns: 1fr;
    }
}
