/* Lendisys cookie consent banner + preferences modal */

:root {
    --ldc-green: #206050;
    --ldc-accent: #62D2A2;
    --ldc-text: #2b3440;
    --ldc-muted: #5c6672;
    --ldc-border: #dfe4e8;
}

.ldc-no-scroll {
    overflow: hidden;
}

/* ------------------------------------------------------------------ Banner */
.ldc-banner {
    position: fixed;
    z-index: 99998;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 3px solid var(--ldc-green);
    box-shadow: 0 -6px 30px rgba(0, 0, 0, .16);
    padding: 22px 0;
    font-family: inherit;

    /* Starting (and exit) state. JS adds .ldc-in on the next frame to animate
       in, and removes it to animate out before the element is detached. */
    transform: translateY(100%);
    opacity: 0;
    will-change: transform, opacity;
    transition: transform .34s cubic-bezier(.22, .61, .36, 1),
                opacity .24s ease;
}

.ldc-banner.ldc-in {
    transform: translateY(0);
    opacity: 1;
}

.ldc-banner.ldc-out {
    transform: translateY(100%);
    opacity: 0;
    /* Slightly quicker leaving than arriving, so dismissal feels responsive. */
    transition: transform .26s cubic-bezier(.4, 0, .7, .3),
                opacity .2s ease .04s;
}

.ldc-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
}

.ldc-banner__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ldc-green);
    margin: 0 0 6px;
}

.ldc-banner__text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ldc-muted);
    margin: 0;
    max-width: 820px;
}

.ldc-banner__text a {
    color: var(--ldc-green);
    text-decoration: underline;
}

.ldc-banner__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    min-width: 190px;
}

/* ----------------------------------------------------------------- Buttons */
.ldc-btn {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    padding: 12px 22px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
    font-family: inherit;
    text-align: center;
}

/* Accept and Reject deliberately share one style: consent must be as easy to
   refuse as to give (GDPR Art. 7(3)). Do not restyle one to outweigh the other. */
.ldc-btn--primary {
    background: var(--ldc-green);
    color: #fff;
    border-color: var(--ldc-green);
}

.ldc-btn--primary:hover {
    background: #17493c;
    border-color: #17493c;
}

.ldc-btn--secondary {
    background: #fff;
    color: var(--ldc-green);
    border-color: var(--ldc-green);
}

.ldc-btn--secondary:hover {
    background: #f2f8f5;
}

.ldc-btn--link {
    background: transparent;
    color: var(--ldc-muted);
    border-color: transparent;
    text-decoration: underline;
    padding: 6px;
}

.ldc-btn--link:hover {
    color: var(--ldc-green);
}

.ldc-btn:focus-visible,
.ldc-switch input:focus-visible + .ldc-switch__track {
    outline: 2px solid var(--ldc-accent);
    outline-offset: 2px;
}

/* ------------------------------------------------------------------- Modal */
.ldc-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(16, 24, 32, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;

    opacity: 0;
    transition: opacity .22s ease;
}

.ldc-overlay.ldc-in {
    opacity: 1;
}

.ldc-modal {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);

    transform: translateY(10px) scale(.98);
    opacity: 0;
    will-change: transform, opacity;
    transition: transform .28s cubic-bezier(.22, .61, .36, 1),
                opacity .22s ease;
}

.ldc-overlay.ldc-in .ldc-modal {
    transform: none;
    opacity: 1;
}

.ldc-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid var(--ldc-border);
}

.ldc-modal__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--ldc-green);
    margin: 0;
}

.ldc-modal__close {
    background: none;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: var(--ldc-muted);
    cursor: pointer;
    padding: 0 4px;
}

.ldc-modal__close:hover {
    color: var(--ldc-text);
}

.ldc-modal__body {
    padding: 10px 26px 22px;
    overflow-y: auto;
}

.ldc-modal__note {
    font-size: 13px;
    color: var(--ldc-muted);
    margin: 18px 0 0;
}

.ldc-modal__note a {
    color: var(--ldc-green);
    text-decoration: underline;
}

.ldc-modal__foot {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px 26px;
    border-top: 1px solid var(--ldc-border);
}

.ldc-modal__foot .ldc-btn {
    flex: 1 1 auto;
}

/* -------------------------------------------------------------- Categories */
.ldc-cat {
    padding: 18px 0;
    border-bottom: 1px solid var(--ldc-border);
}

.ldc-cat:last-of-type {
    border-bottom: 0;
}

.ldc-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ldc-cat__label {
    font-size: 16px;
    font-weight: 600;
    color: var(--ldc-text);
    margin: 0;
    cursor: pointer;
}

.ldc-cat__text {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--ldc-muted);
    margin: 8px 0 0;
    padding-right: 60px;
}

/* ------------------------------------------------------------------ Switch */
.ldc-switch {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
}

.ldc-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.ldc-switch__track {
    position: absolute;
    inset: 0;
    background: #c6ccd2;
    border-radius: 26px;
    transition: background-color .2s ease;
    pointer-events: none;
}

.ldc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}

.ldc-switch input:checked + .ldc-switch__track {
    background: var(--ldc-green);
}

.ldc-switch input:checked + .ldc-switch__track::after {
    transform: translateX(20px);
}

.ldc-switch--locked input {
    cursor: not-allowed;
}

.ldc-switch--locked input:checked + .ldc-switch__track {
    background: #9bb8ad;
}

/* ----------------------------------------------- Blocked third-party slots */
.ldc-slot__text {
    font-size: 14px;
    line-height: 1.6;
    color: inherit;
    opacity: .85;
    margin: 0 0 12px;
}

.ldc-slot__btn {
    font-size: 13px;
    padding: 9px 16px;
}

/* Visitors who ask their OS to reduce motion get the same states with no
   travel. JS mirrors this by removing elements immediately (see motionMs). */
@media (prefers-reduced-motion: reduce) {

    .ldc-banner,
    .ldc-banner.ldc-out,
    .ldc-overlay,
    .ldc-modal {
        transition: none;
        transform: none;
        will-change: auto;
    }
}

/* ------------------------------------------------------------ Small screens */
@media (max-width: 991px) {
    .ldc-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .ldc-banner__actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .ldc-banner__actions .ldc-btn {
        flex: 1 1 140px;
    }
}

@media (max-width: 575px) {
    .ldc-banner {
        padding: 18px 0;
        max-height: 85vh;
        overflow-y: auto;
    }

    .ldc-cat__text {
        padding-right: 0;
    }

    .ldc-modal__foot {
        flex-direction: column;
    }
}
