/* ==========================================================================
   Sandy Media — Site-Wide Cookie Consent Banner & Preferences Modal
   Scoped strictly to .sm-cookie-* classes so it never interferes with pages.
   ========================================================================== */

.sm-cookie-banner[hidden],
.sm-cookie-modal[hidden] {
    display: none !important;
}

.sm-cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 1060;
    width: min(1040px, calc(100vw - 32px));
    transform: translateX(-50%);
    padding: 16px 20px;
    border: 1px solid rgba(52, 168, 83, 0.34);
    border-radius: 18px;
    background: rgba(13, 29, 23, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #f2f7f4;
    box-shadow: 0 22px 54px rgba(4, 14, 10, 0.44);
    box-sizing: border-box;
    animation: smCookieSlideUp 0.28s ease-out;
}

.sm-cookie-banner *,
.sm-cookie-modal * {
    box-sizing: border-box;
}

@keyframes smCookieSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 24px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.sm-cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.sm-cookie-banner__lead {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1 1 420px;
    min-width: 0;
}

.sm-cookie-banner__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(52, 168, 83, 0.16);
    border: 1px solid rgba(84, 224, 129, 0.32);
    color: #6ce590;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sm-cookie-banner__copy {
    min-width: 0;
}

.sm-cookie-banner__title {
    margin: 0 0 3px !important;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.sm-cookie-banner__text {
    margin: 0 !important;
    color: #c5d6cd;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.5;
}

.sm-cookie-banner__link {
    color: #7ee89e;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.sm-cookie-banner__link:hover,
.sm-cookie-banner__link:focus-visible {
    color: #a9f4bf;
}

.sm-cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.sm-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.18s ease;
}

.sm-cookie-btn:focus-visible {
    outline: 2px solid #7ee89e;
    outline-offset: 2px;
}

.sm-cookie-btn--primary {
    border: 1px solid #34a853;
    background: #34a853;
    color: #ffffff;
}

.sm-cookie-btn--primary:hover {
    background: #278e42;
    border-color: #278e42;
    transform: translateY(-1px);
}

.sm-cookie-btn--outline {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.06);
    color: #f1f6f3;
}

.sm-cookie-btn--outline:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.4);
}

.sm-cookie-btn--ghost {
    border: 1px solid transparent;
    background: transparent;
    color: #b7cdc1;
    padding-inline: 10px;
}

.sm-cookie-btn--ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sm-cookie-btn--secondary {
    border: 1px solid rgba(52, 168, 83, 0.45);
    background: rgba(52, 168, 83, 0.12);
    color: #166534;
}

.sm-cookie-btn--secondary:hover {
    background: rgba(52, 168, 83, 0.2);
}

/* Footer Cookie Settings Trigger */
.sm-cookie-footer-btn {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.sm-cookie-footer-btn:hover,
.sm-cookie-footer-btn:focus-visible {
    color: #34a853;
    outline: none;
}

/* Cookie Preferences Modal */
.sm-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 1085;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.sm-cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 17, 13, 0.72);
    backdrop-filter: blur(5px);
}

.sm-cookie-modal__panel {
    position: relative;
    z-index: 2;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    border-radius: 20px;
    background: #ffffff;
    color: #10241c;
    box-shadow: 0 28px 72px rgba(4, 15, 11, 0.36);
}

.sm-cookie-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.sm-cookie-modal__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #1c7c39;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sm-cookie-modal__title {
    margin: 0 !important;
    color: #0e1f19;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.sm-cookie-modal__close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(14, 31, 25, 0.14);
    border-radius: 50%;
    background: #f4f8f5;
    color: #10241c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.sm-cookie-modal__close:hover {
    background: #e7f2eb;
}

.sm-cookie-modal__intro {
    margin: 0 0 18px !important;
    color: #53655c;
    font-size: 14px;
    line-height: 1.6;
}

.sm-cookie-categories {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.sm-cookie-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(14, 31, 25, 0.11);
    border-radius: 14px;
    background: #f7fbf8;
    cursor: pointer;
}

.sm-cookie-cat__title {
    display: block;
    margin-bottom: 3px;
    color: #0e1f19;
    font-size: 14.5px;
    font-weight: 700;
}

.sm-cookie-cat__desc {
    margin: 0 !important;
    color: #5b6d64;
    font-size: 12.5px;
    line-height: 1.5;
}

.sm-cookie-always-on {
    padding: 5px 10px;
    border-radius: 999px;
    background: #e5f6ea;
    color: #166534;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.sm-cookie-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

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

.sm-cookie-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd6cf;
    transition: background-color 0.2s ease;
}

.sm-cookie-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.sm-cookie-switch input:checked + .sm-cookie-slider {
    background: #34a853;
}

.sm-cookie-switch input:checked + .sm-cookie-slider::before {
    transform: translateX(20px);
}

.sm-cookie-switch input:focus-visible + .sm-cookie-slider {
    outline: 2px solid #34a853;
    outline-offset: 2px;
}

.sm-cookie-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.sm-cookie-modal .sm-cookie-btn--outline {
    border-color: rgba(14, 31, 25, 0.2);
    background: #ffffff;
    color: #21322a;
}

.sm-cookie-modal .sm-cookie-btn--outline:hover {
    background: #f4f8f5;
}

@media (max-width: 767px) {
    .sm-cookie-banner {
        bottom: 12px;
        width: calc(100vw - 24px);
        padding: 14px 15px;
        border-radius: 16px;
    }

    .sm-cookie-banner__actions {
        width: 100%;
    }

    .sm-cookie-banner__actions .sm-cookie-btn {
        flex: 1 1 auto;
    }

    .sm-cookie-modal__panel {
        padding: 18px 16px;
    }

    .sm-cookie-modal__footer {
        justify-content: stretch;
    }

    .sm-cookie-modal__footer .sm-cookie-btn {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sm-cookie-banner {
        animation: none;
    }
}
