/* Cookie consent banner styling for the Foundation-based pubquizmaster theme.
   The xddesigners/cookieconsent module ships a Bootstrap-oriented base style; this file
   restyles the (theme-overridden) banner markup to use the theme's Foundation buttons.
   The module's own CSS keeps the fixed bottom-right container + slide-in animation. */

.cookie-consent {
    padding: 1.1rem 1.25rem;
    border-radius: 4px;
}

.cookie-consent__title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    line-height: 1.2;
}

.cookie-consent__body {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

/* Flat buttons — mirrors hoogmoedpensioenadvies: a solid-green primary and hollow (outlined)
   secondary, square corners, no inset highlight. Keeps pubquizmaster's own brand green (#5da423)
   instead of the Foundation .secondary brown. */
.cookie-consent-actions .button {
    margin: 0; /* spacing lives on the .cookie-consent-action wrappers (see below) */
    border-radius: 0;
    box-shadow: none; /* drop the Foundation inset highlight -> flat */
    text-shadow: none;
    text-transform: none;
    font-size: 0.9375rem; /* 15px — Helvetica Neue reads a touch larger than hoogmoed's Lato at 16px */
    font-weight: normal;
    padding-top: 0.85em;
    padding-bottom: 0.85em;
}

/* Primary: solid green, bold, white. */
.cookie-consent-actions .button.success {
    background: #5da423;
    border: 1px solid #5da423;
    color: #fff;
}
.cookie-consent-actions .button.success:hover,
.cookie-consent-actions .button.success:focus {
    background: #457a1a;
    border-color: #457a1a;
    color: #fff;
}

/* Secondary (necessary + settings): hollow — transparent fill, green text + border. */
.cookie-consent-actions .button.secondary {
    background: transparent;
    border: 1px solid #5da423;
    color: #5da423;
    font-weight: normal;
}
.cookie-consent-actions .button.secondary:hover,
.cookie-consent-actions .button.secondary:focus {
    background: transparent;
    border-color: #457a1a;
    color: #457a1a;
}

/* Stacked on small screens: gap goes on the wrappers (each button sits alone in its own
   .cookie-consent-action, so a :last-child on .button would wrongly match every button). */
.cookie-consent-action {
    margin-bottom: 1rem;
}

.cookie-consent-action:last-child {
    margin-bottom: 0;
}

/* Side-by-side from Foundation's medium breakpoint up. */
@media only screen and (min-width: 640px) {
    .cookie-consent-actions {
        display: flex;
        justify-content: space-between;
    }

    .cookie-consent-action {
        flex: 1 1 0;
        margin-bottom: 0;
    }

    .cookie-consent-action:not(:last-child) {
        margin-right: 0.5rem;
    }
}

/* ---- Cookie policy page: consent form with toggle switches ---- */
.cookie-consent-form .cookie-consent-field {
    padding: 1rem 0;
    border-bottom: 1px solid #e8e8e8;
}

.cookie-consent-field .d-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-consent-field__label label {
    margin: 0;
    font-weight: 600;
    font-size: 1.15rem;
}

.cookie-consent-field__description {
    margin-top: 0.4rem;
    color: #555;
    font-size: 0.95rem;
}

/* Toggle switch built from the consent checkbox. */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    flex: none;
}

.cookie-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

.cookie-switch__slider {
    position: absolute;
    inset: 0;
    margin: 0;
    cursor: pointer;
    background: #cfcfcf;
    border-radius: 999px;
    transition: background 0.2s;
}

.cookie-switch__slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.cookie-switch input:checked + .cookie-switch__slider {
    background: #78a22f;
}

.cookie-switch input:checked + .cookie-switch__slider::before {
    transform: translateX(26px);
}

.cookie-switch input:disabled + .cookie-switch__slider {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Save button (module renders a Bootstrap .btn-primary; make it a theme-green button). */
.cookie-consent-form button[name="action_submitConsent"] {
    display: inline-block;
    margin-top: 1.25rem;
    padding: 0.6em 1.4em;
    background: #78a22f;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
}

.cookie-consent-form button[name="action_submitConsent"]:hover {
    background: #688c28;
}
