@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;500;700&display=swap');

/* Voorkom horizontale scroll op hele pagina */
html, body {
    overflow-x: hidden;
}

/* ============================================================
   HOOFDCONTAINER - CF7 formulier
   Scoped op .wpcf7-form (standaard CF7 class)
   ============================================================ */
.wpcf7-form {
    --grid-gap: 16px;

    --submit-bg-color: #87b05e;
    --submit-bg-color-hover: #729a4a;

    --input-color: #333;

    --input-bg: #fff;
    --input-bg-hover: #fff;
    --input-bg-focus: #fff;

    --input-border: 1px solid #d4d4d4;
    --input-border-color-hover: #87b05e;
    --input-border-color-focus: #87b05e;

    --label-color: #4a4a4a;

    --not-valid-color: #dc3232;

    border: 2px solid #87b05e;
    padding: 24px;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7faf4 100%);
    box-shadow: 0 4px 12px rgba(135, 176, 94, 0.12);
    transition: box-shadow 0.3s ease;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;

    font-family: 'Ubuntu', sans-serif;
}

.wpcf7-form:hover {
    box-shadow: 0 8px 20px rgba(135, 176, 94, 0.18);
}

.wpcf7-form,
.wpcf7-form * {
    box-sizing: border-box;
    max-width: 100%;
}

/* ============================================================
   GRID SYSTEEM
   ============================================================ */
.cu-grid {
    display: grid;
    grid-gap: var(--grid-gap);
    grid-template-columns: repeat(1, minmax(0, 1fr));
    max-width: 100%;
}

.cu-col-span-full {
    grid-column: 1/-1;
}

/* ============================================================
   LABELS
   ============================================================ */
.wpcf7-form label {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.wpcf7-form .wpcf7-form-control-wrap {
    margin-top: 8px;
    display: block;
}

.wpcf7-form .cu-label-text {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--label-color);
}

.wpcf7-form .wpcf7-list-item-label {
    color: var(--label-color);
}

.wpcf7-form .required {
    color: #f78da7;
    font-weight: bold;
}

/* ============================================================
   FORM CONTROLS - inputs, textareas, selects
   ============================================================ */
.wpcf7-form .wpcf7-form-control-wrap,
.wpcf7-form .wpcf7-form-control:not(.wpcf7-submit) {
    width: 100%;
}

.wpcf7-form input,
.wpcf7-form textarea,
.wpcf7-form select,
.wpcf7-form .wpcf7-submit {
    transition: all 0.3s ease;
    max-width: 100%;
    min-width: 0;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="date"],
.wpcf7-form textarea,
.wpcf7-form select {
    background-color: var(--input-bg);
    border: var(--input-border);
    border-radius: 8px;
    color: var(--input-color);
    font-size: 1rem;
    font-family: 'Ubuntu', sans-serif;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
}

.wpcf7-form input[type="text"]:hover,
.wpcf7-form input[type="email"]:hover,
.wpcf7-form input[type="tel"]:hover,
.wpcf7-form input[type="url"]:hover,
.wpcf7-form input[type="date"]:hover,
.wpcf7-form textarea:hover,
.wpcf7-form select:hover {
    background-color: var(--input-bg-hover);
    border-color: var(--input-border-color-hover);
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form input[type="date"]:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
    background-color: var(--input-bg-focus);
    border-color: var(--input-border-color-focus);
    box-shadow: 0 0 0 3px rgba(135, 176, 94, 0.25);
    color: var(--input-color);
    outline: none;
}

/* Niet-valide velden: roze border conform huisstijl */
.wpcf7-form .wpcf7-not-valid {
    border-color: #f78da7 !important;
    box-shadow: 0 0 0 3px rgba(247, 141, 167, 0.25) !important;
}

.wpcf7-form .wpcf7-not-valid-tip {
    color: var(--not-valid-color);
    font-weight: 600;
    margin-top: 4px;
    font-size: 0.875rem;
}

.wpcf7-form select option {
    color: #333;
}

/* ============================================================
   CHECKBOXES & RADIO BUTTONS
   ============================================================ */
.wpcf7-form .wpcf7-checkbox .wpcf7-list-item,
.wpcf7-form .wpcf7-radio .wpcf7-list-item {
    display: block;
    margin-left: 0;
    margin-bottom: 4px;
}

.wpcf7-form .wpcf7-checkbox .wpcf7-list-item-label,
.wpcf7-form .wpcf7-radio .wpcf7-list-item-label {
    margin-left: 6px;
}

.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}

.wpcf7-form .wpcf7-acceptance .wpcf7-list-item-label {
    margin-left: 10px;
}

/* ============================================================
   SPACING - Ruimte tussen sectie-titels en formulier-grids
   ============================================================ */
.wpcf7-form p {
    margin-top: 24px !important;
    margin-bottom: 20px !important;
}

.wpcf7-form p:first-child {
    margin-top: 0 !important;
}

/* Sectie-koppen met grote font-size: extra ruimte */
.wpcf7-form p span[style*="font-size:28px"],
.wpcf7-form p span[style*="font-size:20px"],
.wpcf7-form p span[style*="font-size: 28px"],
.wpcf7-form p span[style*="font-size: 20px"] {
    display: block;
    padding-top: 12px;
    padding-bottom: 8px;
}

.wpcf7-form .cu-grid {
    margin-top: 4px;
    margin-bottom: 12px;
}

.wpcf7-form .cu-grid + p {
    margin-top: 28px !important;
}

.wpcf7-form .info-box {
    margin-top: 16px;
    margin-bottom: 20px;
}

.wpcf7-form .extra-diensten + br {
    display: block;
    margin-bottom: 12px;
}

.wpcf7-form .extra-diensten-title {
    margin-top: 24px;
}

/* ============================================================
   SUBMIT BUTTON - Groen conform huisstijl
   ============================================================ */
.wpcf7-form .wpcf7-submit {
    background-color: #87b05e;
    color: #ffffff;
    border-radius: 6px;
    padding: 12px 20px;
    width: 100%;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(135, 176, 94, 0.3);
    display: block;
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 100%;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Ubuntu', sans-serif;
    letter-spacing: 0.3px;
}

.wpcf7-form .wpcf7-submit:hover,
.wpcf7-form .wpcf7-submit:focus {
    background: linear-gradient(45deg, #87b05e, #729a4a);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(135, 176, 94, 0.35);
}

.wpcf7-form .wpcf7-submit:active {
    transform: scale(0.98);
}

/* Spinner verbergen / tonen bij submit */
.wpcf7-form .wpcf7-spinner {
    display: none;
}

.wpcf7-form.submitting .wpcf7-submit {
    display: none;
}

.wpcf7-form.submitting .wpcf7-spinner {
    display: inline-block;
}

/* Response output onder formulier */
div.wpcf7-response-output {
    color: var(--label-color);
    margin: 20px 0 0;
    border-radius: 6px;
    padding: 12px 16px;
}

/* ============================================================
   GRID KOLOMMEN - Subtiele borders voor visuele groepering
   ============================================================ */
.wpcf7-form .cu-col-span-4,
.wpcf7-form .cu-col-span-6,
.wpcf7-form .cu-col-span-12 {
    border: 1px solid #e0e8d6;
    border-radius: 8px;
    padding: 14px;
    min-width: 0;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.5);
}

/* Nette spacing tussen grid-secties */
.wpcf7-form .cu-grid + .cu-grid {
    margin-top: var(--grid-gap);
}

/* ============================================================
   CONDITIONAL FIELDS PLUGIN
   ============================================================ */
.wpcf7-form .wpcf7cf-group {
    margin-top: var(--grid-gap);
}

.wpcf7-form .wpcf7cf-hidden {
    margin-top: 0;
}

/* Verberg lege parent wrappers van verborgen conditional groups */
.wpcf7-form .cu-col-span-12:has(> .wpcf7cf-hidden):not(:has(> :not(.wpcf7cf-hidden))) {
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.wpcf7-form > .wpcf7cf-hidden[style*="display: none"],
.wpcf7-form > .wpcf7cf-hidden.wpcf7cf-hidden {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    min-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ============================================================
   INFO-BOX - Groene accent
   ============================================================ */
.wpcf7-form .info-box {
    background-color: #f0f5eb;
    border: 1px solid #87b05e;
    border-left: 4px solid #87b05e;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #4a4a4a;
    font-size: 0.95rem;
}

.wpcf7-form .info-box a {
    color: #87b05e;
    font-weight: 600;
    text-decoration: underline;
}

.wpcf7-form .info-box a:hover {
    color: #729a4a;
}

/* ============================================================
   WARNING-BOX - Rode alert
   ============================================================ */
.wpcf7-form .warning-box {
    background-color: #fef2f2;
    color: #842029;
    border: 1px solid #f5c2c7;
    border-left: 4px solid #dc3232;
    border-radius: 6px;
    padding: 14px 16px;
    margin: 10px 0 15px;
    font-size: 0.95rem;
}

/* ============================================================
   EXTRA DIENSTEN - 3-kolommen tegel grid met toggle switches
   ============================================================ */
.wpcf7-form .extra-diensten-title {
    background-color: #87b05e;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px 6px 0 0;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 24px;
}

.wpcf7-form .extra-diensten {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
    border: 1px solid #e0e8d6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 16px;
    background-color: #fafcf8;
    margin-bottom: 20px;
}

.wpcf7-form .extra-diensten p {
    grid-column: 1 / -1;
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: #4a4a4a;
}

/* Elk item is een flex-container en mag rekken */
.wpcf7-form .extra-diensten .opt {
    display: flex;
    padding: 0;
    border-bottom: none;
}

.wpcf7-form .extra-diensten .opt .wpcf7-form-control-wrap {
    width: 100%;
}

.wpcf7-form .extra-diensten .opt .wpcf7-list-item {
    margin: 0 !important;
    display: block;
    height: 100%;
}

/* Tegel styling */
.wpcf7-form .extra-diensten .opt label {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 72px;
    padding: 12px 14px 12px 62px;
    border: 1px solid #e0e8d6;
    border-radius: 10px;
    background: #fff;
    line-height: 1.35;
    word-break: break-word;
    font-weight: 400;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7-form .extra-diensten .opt label:hover {
    border-color: #87b05e;
    box-shadow: 0 2px 8px rgba(135, 176, 94, 0.15);
    color: inherit;
}

.wpcf7-form .extra-diensten .opt .wpcf7-list-item-label {
    display: block;
    font-size: 15px;
    color: #333;
}

/* Verberg standaard checkbox; klikbaar via label */
.wpcf7-form .extra-diensten input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* Toggle-achtergrond */
.wpcf7-form .extra-diensten .wpcf7-list-item-label::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

/* Toggle-knop */
.wpcf7-form .extra-diensten .wpcf7-list-item-label::after {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: 0.3s;
}

/* Checked state - groen conform huisstijl */
.wpcf7-form .extra-diensten input[type="checkbox"]:checked + .wpcf7-list-item-label::before {
    background: #87b05e;
}

.wpcf7-form .extra-diensten input[type="checkbox"]:checked + .wpcf7-list-item-label::after {
    transform: translateY(-50%) translateX(22px);
}

/* Checked tegel: groene border */
.wpcf7-form .extra-diensten input[type="checkbox"]:checked ~ .wpcf7-list-item-label {
    color: #333;
}

/* ====== Extra diensten responsive ====== */
@media (max-width: 767px) {
    .wpcf7-form .extra-diensten {
        grid-template-columns: 1fr;
        padding: 12px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .wpcf7-form .extra-diensten {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   LINKS - Huisstijl groen
   ============================================================ */
.wpcf7-form a {
    color: #87b05e;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wpcf7-form a:hover {
    color: #729a4a;
    text-decoration: underline;
}

/* ============================================================
   FILE UPLOAD
   ============================================================ */
.wpcf7-form input[type="file"] {
    font-size: 0.9rem;
    color: var(--label-color);
    padding: 8px 0;
}

/* ============================================================
   DESKTOP (768px+)
   ============================================================ */
@media (min-width: 768px) {
    .cu-grid {
        display: grid;
        grid-gap: var(--grid-gap);
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .cu-col-span-1  { grid-column: span 1  / span 1;  }
    .cu-col-span-2  { grid-column: span 2  / span 2;  }
    .cu-col-span-3  { grid-column: span 3  / span 3;  }
    .cu-col-span-4  { grid-column: span 4  / span 4;  }
    .cu-col-span-5  { grid-column: span 5  / span 5;  }
    .cu-col-span-6  { grid-column: span 6  / span 6;  }
    .cu-col-span-7  { grid-column: span 7  / span 7;  }
    .cu-col-span-8  { grid-column: span 8  / span 8;  }
    .cu-col-span-9  { grid-column: span 9  / span 9;  }
    .cu-col-span-10 { grid-column: span 10 / span 10; }
    .cu-col-span-11 { grid-column: span 11 / span 11; }
    .cu-col-span-12 { grid-column: span 12 / span 12; }
}

/* ============================================================
   MOBIEL (tot 767px)
   ============================================================ */
@media (max-width: 767px) {
    .wpcf7-form {
        padding: 12px;
        border-radius: 8px;
        margin-left: 0;
        margin-right: 0;
        width: 100% !important;
        max-width: 100% !important;
    }

    .cu-grid {
        --grid-gap: 10px;
        display: grid;
        grid-template-columns: 1fr !important;
    }

    .wpcf7-form .cu-col-span-4,
    .wpcf7-form .cu-col-span-6,
    .wpcf7-form .cu-col-span-12 {
        padding: 10px;
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .wpcf7-form label {
        font-size: 14px;
    }

    .wpcf7-form input[type="text"],
    .wpcf7-form input[type="email"],
    .wpcf7-form input[type="tel"],
    .wpcf7-form input[type="url"],
    .wpcf7-form input[type="date"],
    .wpcf7-form textarea,
    .wpcf7-form select {
        font-size: 16px; /* voorkomt auto-zoom op iOS */
        width: 100% !important;
        max-width: 100% !important;
    }

    .wpcf7-form .wpcf7-submit {
        padding: 14px 16px;
        font-size: 16px;
    }

    .wpcf7-form p span[style*="font-size:28px"] {
        font-size: 22px !important;
    }

    .wpcf7-form p span[style*="font-size:20px"] {
        font-size: 17px !important;
    }

    /* File upload velden */
    .wpcf7-form input[type="file"] {
        font-size: 14px;
        width: 100% !important;
    }

    /* Acceptance checkboxes */
    .wpcf7-form .wpcf7-acceptance {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Extra diensten mobiel */
    .wpcf7-form .extra-diensten-title {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .wpcf7-form .extra-diensten {
        padding: 8px 12px;
    }
}

/* ============================================================
   TEXTAREA HOOGTE - Opmerkingen velden
   ============================================================ */
textarea[name="bk-info-huisdier-1"],
textarea[name="bk-info-huisdier-2"],
textarea[name="bk-info-huisdier-3"],
textarea[name="bk-info-huisdier-4"],
textarea[name="bk-info-huisdier-5"],
textarea[name="nk-info-huisdier-1"],
textarea[name="nk-info-huisdier-2"],
textarea[name="nk-info-huisdier-3"],
textarea[name="nk-info-huisdier-4"],
textarea[name="nk-info-huisdier-5"] {
    height: 120px;
    resize: vertical;
    padding-top: 10px;
}
