/* FE1007_COOKIE_TOGGLE_BALANCE
   Geometry/state-only correction for Cookie Settings switches.
   Cookie persistence and modal behaviour are untouched. */

/* Keep each label row responsible for text width while the switch occupies
   a fixed, predictable footprint on the right. */
html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle {
    align-items: center !important;
    gap: 18px !important;
}

html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle .gdpr-toggle-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* Exact switch geometry. This selector intentionally outranks generic
   dark-mode input rules added by FE1006 and earlier theme CSS. */
html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;

    flex: 0 0 44px !important;
    align-self: center !important;

    box-sizing: border-box !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;

    margin: 0 !important;
    padding: 0 !important;

    position: relative !important;
    display: block !important;

    border: 1px solid #9EBEBE !important;
    border-radius: 999px !important;
    background: #D7E3E3 !important;

    box-shadow: none !important;
    outline: 0 !important;

    cursor: pointer !important;
    vertical-align: middle !important;

    transition:
        background-color .16s ease,
        border-color .16s ease !important;
}

/* Remove any old competing pseudo-element. */
html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]::before {
    content: none !important;
    display: none !important;
}

/* One knob only. */
html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]::after {
    content: "" !important;

    box-sizing: border-box !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;

    width: 18px !important;
    height: 18px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: #FFFFFF !important;
    box-shadow: 0 1px 3px rgba(11,45,48,.22) !important;

    transform: translateX(0) !important;
    transition:
        transform .16s ease,
        background-color .16s ease !important;
}

/* ON */
html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:checked {
    background: #0B9CA0 !important;
    border-color: #0B9CA0 !important;
}

html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:checked::after {
    transform: translateX(20px) !important;
}

/* OFF - explicitly force the knob back left so old styles cannot leave it
   visually on the right. */
html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:not(:checked) {
    background: #D7E3E3 !important;
    border-color: #9EBEBE !important;
}

html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:not(:checked)::after {
    transform: translateX(0) !important;
}

/* Strictly necessary: permanently ON but visually identified as locked. */
html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:checked:disabled {
    background: #6D9293 !important;
    border-color: #6D9293 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:checked:disabled::after {
    background: #E8F0F0 !important;
    transform: translateX(20px) !important;
}

/* Keyboard accessibility. */
html[data-kisure-design="865"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(11,156,160,.32) !important;
    outline-offset: 3px !important;
}

/* Dark-mode track contrast. */
html[data-kisure-design="865"][data-theme="dark"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:not(:checked) {
    background: #263435 !important;
    border-color: #607879 !important;
}

html[data-kisure-design="865"][data-theme="dark"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:checked {
    background: #0B9CA0 !important;
    border-color: #36B8BB !important;
}

html[data-kisure-design="865"][data-theme="dark"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]:checked:disabled {
    background: #496A6C !important;
    border-color: #698486 !important;
}

html[data-kisure-design="865"][data-theme="dark"] body.site-body
.gdpr-cookie-modal .gdpr-modal-card
.gdpr-cookie-toggle > input[type="checkbox"]::after {
    background: #F7FFFF !important;
}

/* Keep the switch compact on phones too. */
@media (max-width: 640px) {
    html[data-kisure-design="865"] body.site-body
    .gdpr-cookie-modal .gdpr-modal-card
    .gdpr-cookie-toggle {
        gap: 12px !important;
    }

    html[data-kisure-design="865"] body.site-body
    .gdpr-cookie-modal .gdpr-modal-card
    .gdpr-cookie-toggle > input[type="checkbox"] {
        flex-basis: 44px !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-kisure-design="865"] body.site-body
    .gdpr-cookie-modal .gdpr-modal-card
    .gdpr-cookie-toggle > input[type="checkbox"],
    html[data-kisure-design="865"] body.site-body
    .gdpr-cookie-modal .gdpr-modal-card
    .gdpr-cookie-toggle > input[type="checkbox"]::after {
        transition: none !important;
    }
}
