/* Consent banner — centered pop-up (modal), styled to match the site
   (Baloo 2 / Nunito, green theme, rounded CTA buttons). It used to be a
   fixed bottom bar that overlapped the cart drawer totals on the lower edge. */
.cookie-consent-banner {
    position: fixed;
    inset: 0;
    background-color: rgba(20, 30, 33, .55);
    backdrop-filter: blur(2px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Nunito', system-ui, sans-serif;
}

.cookie-consent-banner.show {
    display: flex;
}

.cookie-consent-content {
    background-color: var(--paper, #fffdf8);
    border: 2px solid var(--line, #ece4d6);
    border-radius: var(--r-lg, 28px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    max-width: 480px;
    width: 100%;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h3 {
    margin: 0 0 0.6rem 0;
    color: var(--green-d, #2f7a30);
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1.1;
}

.cookie-consent-text p {
    margin: 0;
    color: var(--ink-soft, #56636b);
    font-size: 0.95rem;
    line-height: 1.55;
}

.cookie-consent-text a {
    color: var(--green, #3f9e3f);
    text-decoration: underline;
    font-weight: 700;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.85rem;
    flex-shrink: 0;
}

.cookie-consent-btn {
    font-family: 'Baloo 2', system-ui, sans-serif;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: transform .12s ease, box-shadow .12s ease, background-color .2s ease;
}

.cookie-consent-btn-accept {
    flex: 1;
    background-color: var(--green, #3f9e3f);
    color: #fff;
    box-shadow: 0 5px 0 var(--green-d, #2f7a30);
}

.cookie-consent-btn-accept:hover {
    transform: translateY(-1px);
}

.cookie-consent-btn-accept:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 var(--green-d, #2f7a30);
}

.cookie-consent-btn-settings {
    background-color: #fff;
    color: var(--ink, #2c3338);
    border: 2px solid var(--line, #ece4d6);
}

.cookie-consent-btn-settings:hover {
    background-color: var(--muted, #f0ebe1);
}

/* Reject-all: same prominence as accept (DSGVO first-layer requirement) —
   equal size/shape/shadow, but a softer grey so it reads calmer than the
   near-black it used to be, especially on wide screens. */
.cookie-consent-btn-reject {
    flex: 1;
    background-color: var(--ink-soft, #56636b);
    color: #fff;
    box-shadow: 0 5px 0 #3d474d;
}

.cookie-consent-btn-reject:hover {
    transform: translateY(-1px);
}

.cookie-consent-btn-reject:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #3d474d;
}

.cookie-settings-modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(20, 30, 33, .55);
    backdrop-filter: blur(2px);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Nunito', system-ui, sans-serif;
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background-color: var(--paper, #fffdf8);
    border: 2px solid var(--line, #ece4d6);
    padding: 2.25rem;
    border-radius: var(--r-lg, 28px);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
}

.cookie-settings-header {
    margin-bottom: 1.5rem;
}

.cookie-settings-header h3 {
    margin: 0 0 0.5rem 0;
    color: var(--green-d, #2f7a30);
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.cookie-settings-header p {
    margin: 0;
    color: var(--ink-soft, #56636b);
    font-size: 0.95rem;
    line-height: 1.55;
}

.cookie-settings-header a {
    color: var(--green, #3f9e3f);
    text-decoration: underline;
    font-weight: 700;
}

.cookie-settings-options {
    margin-bottom: 1.5rem;
}

.cookie-setting-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1.05rem 1.25rem;
    margin-bottom: 0.75rem;
    background-color: var(--cream, #fbf7ef);
    border: 1.5px solid var(--line, #ece4d6);
    border-radius: var(--r-md, 18px);
    transition: border-color .2s ease, background-color .2s ease;
}

.cookie-setting-option:last-child {
    margin-bottom: 0;
}

/* Highlight the toggleable options on hover; the "necessary" row is locked. */
.cookie-setting-option:has(input:not(:disabled)):hover {
    border-color: var(--green, #3f9e3f);
    background-color: #fff;
}

.cookie-setting-option:has(input:disabled) {
    background-color: var(--blue-soft, #e7f4f5);
    border-color: var(--blue, #bfe4e8);
}

.cookie-setting-info h4 {
    margin: 0 0 0.35rem 0;
    color: var(--ink, #2c3338);
    font-family: 'Baloo 2', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.cookie-setting-info {
    flex: 1;
    padding-right: 1.5rem;
}

.cookie-setting-info p {
    margin: 0;
    color: var(--ink-soft, #56636b);
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-setting-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-setting-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-setting-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--line, #ece4d6);
    transition: .4s;
    border-radius: 24px;
}

.cookie-setting-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .cookie-setting-slider {
    background-color: var(--green, #3f9e3f);
}

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

/* Necessary cookies — always on, not switchable */
input:disabled + .cookie-setting-slider {
    cursor: not-allowed;
    opacity: .65;
}

.cookie-settings-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line, #ece4d6);
}

.cookie-settings-footer .cookie-consent-btn {
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
}


@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 1.75rem 1.5rem;
    }

    .cookie-consent-buttons {
        flex-direction: column-reverse;
    }

    .cookie-setting-option {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }
}
