/*
 * gm-pitch-cta.css - de koop-popup op een pitch (garagemaatje-pitch, Garagemaatje\Pitch\PitchCta).
 *
 * In de huisstijl van garagemaatje.nl, niet in die van de garage: inkt
 * (#181828), wit, één geel (#f8b900), Cal Sans voor koppen en het
 * woordmerk, Inter voor de rest. De gele pil klapt bij hover om zoals op de
 * landing: een inktvlak zakt van boven binnen en het label wordt geel.
 *
 * Altijd rechtsonder, in twee maten: klein (.gmpc-mini, een kaartje met de
 * verkoper) en groot (.gmpc-groot, het hele aanbod). Groot groeit vanuit de
 * hoek rechtsonder over het kleine kaartje heen; de class op #gm-pitch-cta
 * (is-klein / is-groot) bepaalt welke te zien is.
 *
 * Alles hangt onder #gm-pitch-cta. Het id en de reset (all: revert) houden
 * de stylesheet van de pitch erbuiten: een thema dat h2, button of input
 * opmaakt, zou de popup anders meekleuren.
 */

#gm-pitch-cta {
    --gmpc-inkt: #181828;
    --gmpc-geel: #f8b900;
    --gmpc-wit: #ffffff;
    --gmpc-zacht: rgba(252, 251, 250, 0.7);
    --gmpc-zachter: rgba(252, 251, 250, 0.5);
    --gmpc-lijn: rgba(255, 255, 255, 0.1);
    --gmpc-vlak: rgba(255, 255, 255, 0.06);
    --gmpc-display: "Cal Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --gmpc-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --gmpc-curve: cubic-bezier(0.22, 1, 0.36, 1);
}

#gm-pitch-cta :not(svg, svg *) {
    all: revert;
    box-sizing: border-box;
}

#gm-pitch-cta[hidden],
#gm-pitch-cta [hidden] {
    display: none !important;
}

/* ── De houder: altijd rechtsonder ───────────────────────────────────────── */

#gm-pitch-cta {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2147482000;
    font-family: var(--gmpc-body);
    font-size: 15px;
    line-height: 1.55;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.35s var(--gmpc-curve), transform 0.55s var(--gmpc-curve);
}

#gm-pitch-cta.is-zichtbaar {
    opacity: 1;
    transform: none;
}

/* Koest tijdens het welkomstscherm en de rondleiding van het poppetje. */
#gm-pitch-cta.is-koest {
    visibility: hidden;
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.4s var(--gmpc-curve), visibility 0s 0.4s;
}

/* Na de rondleiding wijst het poppetje hem aan: even opspringen. */
#gm-pitch-cta.is-uitgelicht .gmpc-mini {
    animation: gmpc-tik 1.2s ease-in-out 3;
}

@keyframes gmpc-tik {
    0%, 100% { transform: none; }
    40% { transform: translateY(-4px) scale(1.03); }
}

/* ── Klein: het kaartje met de verkoper ──────────────────────────────────── */

#gm-pitch-cta .gmpc-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: calc(100vw - 48px);
    margin: 0;
    padding: 8px 14px 8px 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: var(--gmpc-inkt);
    color: var(--gmpc-wit);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16), 0 20px 44px -20px rgba(10, 10, 30, 0.6);
    font-family: var(--gmpc-body);
    text-align: left;
    cursor: pointer;
    transform-origin: bottom right;
    transition: opacity 0.25s ease, transform 0.45s var(--gmpc-curve), border-color 0.2s ease, visibility 0s;
}

#gm-pitch-cta .gmpc-mini:hover {
    border-color: var(--gmpc-geel);
}

#gm-pitch-cta .gmpc-mini .gmpc-foto {
    width: 48px;
    height: 48px;
    font-size: 16px;
    box-shadow: 0 0 0 2px var(--gmpc-wit);
}

#gm-pitch-cta .gmpc-mini-tekst {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

#gm-pitch-cta .gmpc-mini-logo {
    display: block;
    width: auto;
    height: 11px;
    margin-bottom: 5px;
}

#gm-pitch-cta .gmpc-mini-kop {
    display: block;
    font-family: var(--gmpc-display);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--gmpc-wit);
    white-space: nowrap;
}

#gm-pitch-cta .gmpc-mini-sub {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.3;
    color: var(--gmpc-zacht);
    white-space: nowrap;
}

#gm-pitch-cta .gmpc-mini-pijl {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    margin-left: 2px;
    border-radius: 999px;
    background: var(--gmpc-geel);
    color: var(--gmpc-inkt);
}

#gm-pitch-cta.is-groot .gmpc-mini {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.3s var(--gmpc-curve), visibility 0s 0.3s;
}

/* ── Groot: het hele aanbod, groeit uit de hoek rechtsonder ──────────────── */

#gm-pitch-cta .gmpc-groot {
    position: absolute;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    width: min(408px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    max-height: calc(100svh - 48px);
    overflow: auto;
    padding: 22px 24px 24px;
    border: 1px solid var(--gmpc-lijn);
    border-radius: 20px;
    background: var(--gmpc-inkt);
    color: var(--gmpc-wit);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), 0 36px 80px -32px rgba(10, 10, 30, 0.6);
    transform-origin: bottom right;
    opacity: 0;
    transform: scale(0.55);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.5s var(--gmpc-curve), visibility 0s 0.5s;
}

#gm-pitch-cta.is-groot .gmpc-groot {
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, transform 0.55s var(--gmpc-curve), visibility 0s;
}

#gm-pitch-cta .gmpc-boven {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -4px -8px 14px 0;
}

#gm-pitch-cta .gmpc-merk {
    font-family: var(--gmpc-display);
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
    color: var(--gmpc-geel);
}

#gm-pitch-cta .gmpc-logo {
    display: block;
    width: auto;
    height: 20px;
}

#gm-pitch-cta .gmpc-sluit {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--gmpc-zacht);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#gm-pitch-cta .gmpc-sluit:hover {
    background: var(--gmpc-vlak);
    color: var(--gmpc-wit);
}

#gm-pitch-cta .gmpc-kop {
    display: block;
    margin: 0;
    font-family: var(--gmpc-display);
    font-size: 29px;
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -0.015em;
    color: var(--gmpc-wit);
    text-wrap: balance;
}

#gm-pitch-cta .gmpc-kop em {
    font-style: normal;
    color: var(--gmpc-geel);
}

#gm-pitch-cta .gmpc-tekst {
    display: block;
    margin: 12px 0 0;
    color: var(--gmpc-zacht);
}

#gm-pitch-cta .gmpc-tekst strong {
    font-weight: 600;
    color: var(--gmpc-wit);
}

/* ── Prijs en verkoper ───────────────────────────────────────────────────── */

#gm-pitch-cta .gmpc-prijs {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--gmpc-lijn);
}

#gm-pitch-cta .gmpc-bedrag {
    font-family: var(--gmpc-display);
    font-size: 30px;
    line-height: 1;
    color: var(--gmpc-geel);
}

#gm-pitch-cta .gmpc-per {
    font-size: 14px;
    color: var(--gmpc-zacht);
}

/* Wie je spreekt: bovenaan, met een groot portret en een witte rand, zodat het
   gezicht loskomt van de donkere kaart. */
#gm-pitch-cta .gmpc-verkoper {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
}

#gm-pitch-cta .gmpc-verkoper .gmpc-foto {
    width: 64px;
    height: 64px;
    font-size: 22px;
    box-shadow: 0 0 0 2px var(--gmpc-wit), 0 10px 24px -10px rgba(0, 0, 0, 0.6);
}

#gm-pitch-cta .gmpc-foto {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--gmpc-geel);
    color: var(--gmpc-inkt);
    font-family: var(--gmpc-display);
    font-size: 16px;
    line-height: 1;
    object-fit: cover;
}

#gm-pitch-cta .gmpc-naam {
    display: block;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--gmpc-wit);
}

#gm-pitch-cta .gmpc-rol {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    color: var(--gmpc-zachter);
}

/* ── Acties: één gele pil, één tekstlink ─────────────────────────────────── */

#gm-pitch-cta .gmpc-acties {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 20px 0 0;
}

#gm-pitch-cta .gmpc-knop {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    margin: 0;
    padding: 0 24px;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--gmpc-geel);
    color: var(--gmpc-inkt);
    font-family: var(--gmpc-body);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: scale 0.12s var(--gmpc-curve);
    -webkit-tap-highlight-color: transparent;
}

#gm-pitch-cta .gmpc-knop:active {
    scale: 0.975;
}

#gm-pitch-cta .gmpc-knop[disabled] {
    cursor: progress;
    opacity: 0.7;
}

/* Het inktvlak dat bij hover van boven binnenzakt, met de gele ring erop. */
#gm-pitch-cta .gmpc-vlak {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--gmpc-inkt);
    box-shadow: inset 0 0 0 2px var(--gmpc-geel);
    translate: 0 -101%;
    clip-path: inset(100% 0 0 0);
    transition: clip-path 0.45s var(--gmpc-curve), translate 0s 0.45s;
}

#gm-pitch-cta .gmpc-knop:hover .gmpc-vlak,
#gm-pitch-cta .gmpc-knop:focus-visible .gmpc-vlak {
    translate: 0 0;
    clip-path: inset(0);
    transition: translate 0.45s var(--gmpc-curve), clip-path 0s;
}

#gm-pitch-cta .gmpc-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    transition: color 0.3s var(--gmpc-curve) 0.08s;
}

#gm-pitch-cta .gmpc-knop:hover .gmpc-label,
#gm-pitch-cta .gmpc-knop:focus-visible .gmpc-label {
    color: var(--gmpc-geel);
}

#gm-pitch-cta .gmpc-nummer {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    opacity: 0.75;
}

#gm-pitch-cta .gmpc-link {
    display: inline;
    margin: 0;
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--gmpc-wit);
    font-family: var(--gmpc-body);
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 5px;
    cursor: pointer;
    transition: text-decoration-color 0.2s ease;
}

#gm-pitch-cta .gmpc-link:hover {
    text-decoration-color: var(--gmpc-geel);
}

#gm-pitch-cta .gmpc-knop:focus-visible,
#gm-pitch-cta .gmpc-link:focus-visible,
#gm-pitch-cta .gmpc-sluit:focus-visible,
#gm-pitch-cta .gmpc-terug:focus-visible,
#gm-pitch-cta .gmpc-mini:focus-visible {
    outline: 2px solid var(--gmpc-geel);
    outline-offset: 3px;
}

/* ── Belafspraak ─────────────────────────────────────────────────────────── */

#gm-pitch-cta .gmpc-terug {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--gmpc-zacht);
    font-family: var(--gmpc-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

#gm-pitch-cta .gmpc-terug:hover {
    color: var(--gmpc-wit);
}

#gm-pitch-cta .gmpc-groep {
    display: block;
    min-width: 0;
    margin: 18px 0 0;
    padding: 0;
    border: 0;
}

#gm-pitch-cta .gmpc-groep-kop {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--gmpc-zacht);
}

#gm-pitch-cta .gmpc-keuzes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#gm-pitch-cta .gmpc-keuze {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

#gm-pitch-cta .gmpc-keuze input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#gm-pitch-cta .gmpc-keuze span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: var(--gmpc-wit);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#gm-pitch-cta .gmpc-keuze:hover span {
    border-color: rgba(255, 255, 255, 0.4);
}

#gm-pitch-cta .gmpc-keuze input:checked + span {
    border-color: var(--gmpc-geel);
    background: var(--gmpc-geel);
    color: var(--gmpc-inkt);
    font-weight: 600;
}

#gm-pitch-cta .gmpc-keuze input:focus-visible + span {
    outline: 2px solid var(--gmpc-geel);
    outline-offset: 2px;
}

#gm-pitch-cta .gmpc-veld {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: var(--gmpc-vlak);
    color: var(--gmpc-wit);
    font-family: var(--gmpc-body);
    font-size: 16px;
    font-variant-numeric: tabular-nums;
    outline: none;
    transition: border-color 0.2s ease;
}

#gm-pitch-cta .gmpc-veld::placeholder {
    color: var(--gmpc-zachter);
}

#gm-pitch-cta .gmpc-veld:focus {
    border-color: var(--gmpc-geel);
}

#gm-pitch-cta .gmpc-fout {
    display: block;
    margin: 12px 0 0;
    font-size: 14px;
    color: #ffb4a8;
}

#gm-pitch-cta .gmpc-klein {
    display: block;
    margin: 12px 0 0;
    font-size: 13px;
    text-align: center;
    color: var(--gmpc-zachter);
}

#gm-pitch-cta .gmpc-vinkje {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 0 16px;
    border-radius: 999px;
    background: var(--gmpc-geel);
    color: var(--gmpc-inkt);
}

/* ── Telefoon: ook rechtsonder, met een smallere rand ────────────────────── */

@media (max-width: 640px) {
    #gm-pitch-cta {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    #gm-pitch-cta .gmpc-mini {
        max-width: calc(100vw - 24px);
    }

    #gm-pitch-cta .gmpc-groot {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        max-height: calc(100svh - 24px - env(safe-area-inset-bottom, 0px));
        padding: 18px 20px 20px;
    }

    #gm-pitch-cta .gmpc-kop {
        font-size: 25px;
    }

    #gm-pitch-cta .gmpc-tekst {
        font-size: 14px;
    }

    #gm-pitch-cta .gmpc-prijs {
        margin-top: 14px;
    }

    #gm-pitch-cta .gmpc-verkoper .gmpc-foto {
        width: 56px;
        height: 56px;
    }

    #gm-pitch-cta .gmpc-prijs {
        padding-top: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #gm-pitch-cta,
    #gm-pitch-cta .gmpc-mini,
    #gm-pitch-cta .gmpc-groot,
    #gm-pitch-cta .gmpc-vlak,
    #gm-pitch-cta .gmpc-label {
        transition: opacity 0.2s linear, visibility 0s;
        transform: none;
    }
}

@media print {
    #gm-pitch-cta {
        display: none !important;
    }
}
