/*
 * Water Concepts
 * Contactpagina — layout, gegevenskaart, formulier (CF7)
 *
 * Laadt op elke pagina met [wce_company_details] of een
 * CF7-formulier (styles.inc.php), na de CSS van CF7.
 *
 * Editor (per taal):
 *   Kolommen-blok, extra CSS-class "contact-layout"
 *     links:  shortcode [wce_company_details]
 *     rechts: alinea (class "eyebrow") + H2 + alinea + CF7-formulier
 *   daaronder: shortcode [wce_category_cards]
 *
 * Hoeken (handout §3): alles in het formulier, ook de
 * verzendknop, --radius-md. !important op de knop vanwege
 * de globale button-stijl in buttons.css.
 */


/* ==========================================
   VARIABELEN
   Foutkleur: er is (nog) geen token voor.
   #b42318 op wit ≈ 6,5:1 (AA). Losse waarde,
   alleen in dit bestand.
========================================== */

.company-details,
.wce-form,
.wpcf7 {
    --form-control-border: var(--neutral-300);
    --form-error: #b42318;
}


/* ==========================================
   LAYOUT — 2 KAARTEN NAAST ELKAAR
   Gegevens links (5/12), formulier rechts
   (7/12). Eigen grid i.p.v. de flex-kolommen
   van WordPress. Beide kolommen zijn een
   kaart (--neutral-100, --radius-md, geen
   rand) en even hoog (grid stretch).

   Ruimte boven: de hero sluit direct aan op
   de content; zelfde ritme als de secties op
   de homepage (5 / 4 / 3rem).
========================================== */

.wce-contact .entry-content .contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: stretch;
    gap: 2rem;

    margin: 5rem 0;
}

.wce-contact .entry-content .contact-layout > .wp-block-column {
    flex-basis: auto !important;

    min-width: 0;
    margin: 0 !important;
}

/* Links: de gegevenskaart vult de kolomhoogte. */
.wce-contact .entry-content .contact-layout > .wp-block-column:first-child {
    display: flex;
    flex-direction: column;
}

.wce-contact .entry-content .contact-layout > .wp-block-column:first-child > * {
    margin: 0;
}

.wce-contact .entry-content .contact-layout .company-details {
    flex: 1 1 auto;
}

/* Rechts: de kolom zelf is de kaart. */
.wce-contact .entry-content .contact-layout > .wp-block-column:last-child {
    padding: 2rem 2.5rem 2.5rem;

    border-radius: var(--radius-md);

    background: var(--neutral-100);
}


/* ------------------------------------------
   RECHTERKAART — EYEBROW + KOP + INTRO
   Editor: alinea met class "eyebrow" → H2 →
   alinea → formulier. Zelfde eyebrow als de
   gegevenskaart. H2 op H3-maat (handout §2:
   sectiekoppen binnen een pagina).
   Tekst op --neutral-100: --neutral-600
   (handout §1).
------------------------------------------ */

.wce-contact .entry-content .contact-layout .eyebrow {
    margin: 0 0 0.625rem;

    color: var(--blue-500);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.wce-contact .entry-content .contact-layout h2:not(.company-details__name) {
    margin: 0 0 1rem;

    color: var(--blue-900);

    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.wce-contact .entry-content .contact-layout > .wp-block-column:last-child > p:not(.eyebrow) {
    max-width: 62ch;
    margin: 0 0 2rem;

    color: var(--neutral-600);
}

/* Op --neutral-100 is --neutral-500 te licht. */
.wce-contact .entry-content .contact-layout .wce-form__note,
.wce-contact .entry-content .contact-layout .wce-field__optional {
    color: var(--neutral-600);
}


/* ------------------------------------------
   CATEGORIEKAARTEN BINNEN DE CONTENT
   GP zet de gutter al om de content (zoals
   op de homepage).
------------------------------------------ */

.wce-contact .entry-content .category-cards__inner {
    padding-left: 0;
    padding-right: 0;
}


/* ==========================================
   GEGEVENSKAART
   Vlak --neutral-100 zonder rand, --radius-md.
   Secundaire tekst op dit vlak: --neutral-600
   (handout §1: -500 is te laag op -100).
========================================== */

.company-details {
    padding: 2rem;

    border-radius: var(--radius-md);

    background: var(--neutral-100);
    color: var(--neutral-600);
}

.company-details .company-details__eyebrow {
    margin: 0 0 0.625rem;

    color: var(--blue-500);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.company-details .company-details__name {
    margin: 0 0 1.5rem;

    color: var(--blue-900);

    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: normal;
    line-height: 1.3;
}

/* Naast de formulierkaart: zelfde kopmaat als de
   H2 rechts, zodat beide kaarten gelijk beginnen. */
.wce-contact .entry-content .contact-layout .company-details__name {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}


/* ------------------------------------------
   ADRES + ROUTE
------------------------------------------ */

.company-details__address-group {
    padding-bottom: 1.5rem;
}

.company-details .company-details__address {
    margin: 0 0 0.75rem;

    color: var(--neutral-600);

    font-style: normal;
    line-height: 1.65;
}

.company-details .company-details__route {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--blue-500);

    font-weight: 700;
    text-decoration: none;
}

.company-details .company-details__route svg {
    flex: 0 0 auto;

    color: var(--blue-400);

    transition: transform .2s ease;
}

.company-details .company-details__route:hover {
    color: var(--blue-900);
}

.company-details .company-details__route:hover svg {
    transform: translateX(2px);
}


/* ------------------------------------------
   TELEFOON + E-MAIL
   Icoon in witte cirkel (zoals de kaartpijl),
   icoon --blue-400 (logokleur, niet-tekst).
------------------------------------------ */

.company-details .company-details__contact {
    display: grid;
    gap: 0.75rem;

    margin: 0;
    padding: 1.5rem 0;

    border-top: 1px solid var(--neutral-200);

    list-style: none;
}

.company-details .company-details__contact li {
    margin: 0;
}

.company-details .company-details__contact-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    color: var(--blue-900);

    font-weight: 600;
    text-decoration: none;

    transition: color .2s ease;
}

.company-details__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: var(--white);
    color: var(--blue-400);

    transition: background-color .2s ease, color .2s ease;
}

.company-details .company-details__contact-item:hover {
    color: var(--blue-500);
}

.company-details .company-details__contact-item:hover .company-details__icon {
    background: var(--blue-500);
    color: var(--white);
}

.company-details .company-details__route:focus-visible,
.company-details .company-details__contact-item:focus-visible {
    outline: 2px solid var(--blue-400);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}


/* ------------------------------------------
   KVK + BTW
   Label klein boven, waarde eronder — zelfde
   opbouw als de specificaties op de PDP.
------------------------------------------ */

.company-details .company-details__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;

    margin: 0;
    padding: 1.5rem 0 0;

    border-top: 1px solid var(--neutral-200);
}

.company-details .company-details__meta dt {
    margin: 0 0 0.25rem;

    color: var(--neutral-600);

    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.company-details .company-details__meta dd {
    margin: 0;

    color: var(--blue-900);

    font-size: 0.9375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    overflow-wrap: anywhere;
}


/* ==========================================
   FORMULIER (CF7)
   Opbouw uit het formuliersjabloon:
     .wce-form
       .wce-field (×4, 2 kolommen)
       .wce-field.wce-field--full (bericht)
       .wce-form__actions (knop + CF7-spinner)
       .wce-form__note
   CF7 zet automatisch <p>/<br> uit
   (contact.inc.php).
========================================== */

.wce-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1rem;
}

.wce-form .wce-field--full,
.wce-form .wce-form__actions,
.wce-form .wce-form__note {
    grid-column: 1 / -1;
}


/* ------------------------------------------
   LABELS
------------------------------------------ */

.wce-form .wce-field label {
    display: block;

    margin: 0 0 0.5rem;

    color: var(--blue-900);

    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

.wce-form .wce-field__required {
    color: var(--blue-500);
}

.wce-form .wce-field__optional {
    color: var(--neutral-500);

    font-weight: 400;
}

/* CF7-wrapper om elk veld */
.wce-form .wpcf7-form-control-wrap {
    display: block;
}


/* ------------------------------------------
   VELDEN
   48px hoog (gelijk aan de kooprij op de PDP),
   1rem tekst (voorkomt zoom op iOS).
------------------------------------------ */

.wce-form .wpcf7-form-control:not(.wpcf7-submit) {
    display: block;

    width: 100%;
    height: 48px;

    margin: 0;
    padding: 0 14px;

    border: 1px solid var(--form-control-border);
    border-radius: var(--radius-md);

    background: var(--white);
    color: var(--blue-900);

    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;

    box-shadow: none;

    transition: border-color .2s ease;
}

.wce-form textarea.wpcf7-form-control {
    height: auto;
    min-height: 180px;

    padding: 12px 14px;

    line-height: 1.65;

    resize: vertical;
}

.wce-form .wpcf7-form-control:not(.wpcf7-submit)::placeholder {
    color: var(--neutral-400);
    opacity: 1;
}

.wce-form .wpcf7-form-control:not(.wpcf7-submit):hover {
    border-color: var(--blue-400);
}

.wce-form .wpcf7-form-control:not(.wpcf7-submit):focus {
    border-color: var(--blue-400);
    background: var(--white);
    color: var(--blue-900);

    outline: 2px solid var(--blue-400);
    outline-offset: 1px;
}


/* ------------------------------------------
   FOUTEN (per veld)
------------------------------------------ */

.wce-form .wpcf7-form-control.wpcf7-not-valid,
.wce-form .wpcf7-form-control[aria-invalid="true"] {
    border-color: var(--form-error);
}

.wce-form .wpcf7-form-control.wpcf7-not-valid:focus {
    outline-color: var(--form-error);
}

.wce-form .wpcf7-not-valid-tip {
    display: block;

    margin: 0.375rem 0 0;

    color: var(--form-error);

    font-size: 0.875rem;
    line-height: 1.4;
}


/* ------------------------------------------
   VERZENDKNOP
   Knop in een formulier → --radius-md (geen
   pill), --blue-500 met witte tekst, hover
   --blue-900 — gelijk aan "In winkelwagen".
------------------------------------------ */

.wce-form .wce-form__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.wce-form .wpcf7-submit {
    height: 48px;

    margin: 0;
    padding: 0 28px !important;

    border: 0 !important;
    border-radius: var(--radius-md) !important;

    background: var(--blue-500) !important;
    color: var(--white) !important;

    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;

    transition: background-color .2s ease;
}

.wce-form .wpcf7-submit:hover {
    background: var(--blue-900) !important;
}

.wce-form .wpcf7-submit:focus {
    outline: none;
}

.wce-form .wpcf7-submit:focus-visible {
    outline: 2px solid var(--blue-400);
    outline-offset: 2px;
}

/* CF7-spinner direct naast de knop */
.wce-form .wpcf7-spinner {
    margin: 0;
}


/* ------------------------------------------
   PRIVACYREGEL
------------------------------------------ */

.wce-form .wce-form__note {
    margin: 0;

    color: var(--neutral-500);

    font-size: 0.875rem;
    line-height: 1.5;
}

.wce-form .wce-form__note a {
    color: var(--blue-500);

    font-weight: 600;
}

.wce-form .wce-form__note a:hover {
    color: var(--blue-900);
}


/* ------------------------------------------
   MELDING NA VERZENDEN (CF7)
   Vervangt de gekleurde rand van CF7 door een
   vlak met tekst.
     verzonden          → --blue-100 / --blue-900
     fout / spam / etc. → lichte foutkleur /
                          --form-error
------------------------------------------ */

.wpcf7 form .wpcf7-response-output {
    margin: 1.5rem 0 0;
    padding: 0.875rem 1rem;

    border: 0;
    border-radius: var(--radius-md);

    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.5;
}

.wpcf7 form.sent .wpcf7-response-output {
    background: var(--blue-100);
    color: var(--blue-900);
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
    background: color-mix(in srgb, var(--form-error) 8%, var(--white));
    color: var(--form-error);
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 1024px) {

    .wce-contact .entry-content .contact-layout {
        gap: 1.5rem;

        margin: 4rem 0;
    }

    .wce-contact .entry-content .contact-layout > .wp-block-column:last-child {
        padding: 1.5rem;
    }

    .wce-contact .entry-content .contact-layout h2:not(.company-details__name),
    .wce-contact .entry-content .contact-layout .company-details__name {
        font-size: 1.5rem;
    }

    .company-details {
        padding: 1.5rem;
    }

    /* Smalle kaart: KvK en btw onder elkaar. */
    .company-details .company-details__meta {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ==========================================
   MOBIEL
   Eén kolom: gegevens eerst (zoals de huidige
   site), dan het formulier.
========================================== */

@media (max-width: 768px) {

    .wce-contact .entry-content .contact-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;

        margin: 3rem 0;
    }

    .wce-contact .entry-content .contact-layout h2:not(.company-details__name),
    .wce-contact .entry-content .contact-layout .company-details__name {
        font-size: 1.375rem;
    }

    .company-details .company-details__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wce-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .wce-form .wpcf7-submit {
        width: 100%;
    }
}


/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {

    .company-details .company-details__route svg,
    .company-details__icon,
    .wce-form .wpcf7-form-control,
    .wce-form .wpcf7-submit {
        transition: none;
    }

    .company-details .company-details__route:hover svg {
        transform: none;
    }
}