/**
 * Cookie Consent Banner & Preferences Modal
 * Google Consent Mode v2 compliant
 */

/* ── Banner (bottom overlay) ── */
.cookie-consent-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100001;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px 24px;
    font-family: 'Hind', sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}
.cookie-consent-banner.is-visible {
    display: block;
}
.cookie-consent-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.cookie-consent-banner__text {
    flex: 1 1 400px;
}
.cookie-consent-banner__text h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #0D0D0D;
}
.cookie-consent-banner__text p {
    margin: 0;
    font-size: 13px;
    color: #555;
}
.cookie-consent-banner__text a {
    color: #00882a;
    text-decoration: underline;
}
.cookie-consent-banner__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.cookie-consent-btn {
    padding: 10px 22px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.cookie-consent-btn--accept {
    background: #00882a;
    color: #fff;
    border-color: #00882a;
}
.cookie-consent-btn--accept:hover {
    background: #006b21;
}
.cookie-consent-btn--reject {
    background: #fff;
    color: #333;
    border-color: #ccc;
}
.cookie-consent-btn--reject:hover {
    background: #f5f5f5;
}
.cookie-consent-btn--settings {
    background: transparent;
    color: #00882a;
    border-color: #00882a;
}
.cookie-consent-btn--settings:hover {
    background: #00882a;
    color: #fff;
}

/* ── Preferences Modal (overlay) ── */
.cookie-consent-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100002;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}
.cookie-consent-overlay.is-visible {
    display: flex;
}
.cookie-consent-modal {
    background: #fff;
    border-radius: 10px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    font-family: 'Hind', sans-serif;
}
.cookie-consent-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
}
.cookie-consent-modal__header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0D0D0D;
}
.cookie-consent-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}
.cookie-consent-modal__close:hover {
    color: #333;
}
.cookie-consent-modal__body {
    padding: 20px 24px;
}
.cookie-consent-modal__intro {
    font-size: 13px;
    color: #555;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ── Category rows ── */
.cookie-category {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.cookie-category__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cookie-category__info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0D0D0D;
}
.cookie-category__info p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}
.cookie-category__badge {
    font-size: 11px;
    font-weight: 600;
    color: #00882a;
    background: #e6f5ec;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

/* ── Toggle switch ── */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cookie-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.2s;
}
.cookie-toggle__slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.cookie-toggle input:checked + .cookie-toggle__slider {
    background: #00882a;
}
.cookie-toggle input:checked + .cookie-toggle__slider::before {
    transform: translateX(20px);
}

/* ── Modal footer ── */
.cookie-consent-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Footer link ── */
.cookie-settings-link {
    cursor: pointer;
    color: inherit;
    text-decoration: underline;
}
.cookie-settings-link:hover {
    color: #00882a;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .cookie-consent-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-consent-banner__buttons {
        justify-content: stretch;
    }
    .cookie-consent-btn {
        flex: 1;
        text-align: center;
    }
    .cookie-consent-modal {
        width: 95%;
        max-height: 90vh;
    }
}
