/* Cookie consent banner */

.matn-cookie-banner__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(31, 42, 37, 0.45);
    z-index: 99998;
}

.matn-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    pointer-events: none;
}

/* Full-bleed bar flush to the bottom edge; content is centered and capped so it
   stays readable on ultra-wide screens while using the full width otherwise. */
.matn-cookie-banner__panel {
    pointer-events: auto;
    background: #fff;
    border-top: 1px solid #d9d5cb;
    box-shadow: 0 -6px 24px rgba(31, 42, 37, 0.12);
    padding: 12px clamp(16px, 4vw, 56px);
}

/* Main view: text + actions on one row so the bar stays as short as possible. */
.matn-cookie-banner__main {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0 auto;
}

.matn-cookie-banner__main-content {
    flex: 1 1 auto;
    min-width: 0;
}

/* Preferences view stays a comfortably readable column, centered in the bar. */
.matn-cookie-banner__preferences {
    max-width: 760px;
    margin: 0 auto;
}

.matn-cookie-banner__title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2a25;
    margin: 0 0 3px;
}

.matn-cookie-banner__text {
    font-size: 14px;
    line-height: 1.45;
    color: #3d4a44;
    margin: 0 0 4px;
}

.matn-cookie-banner__links {
    margin: 0;
    font-size: 13px;
}

.matn-cookie-banner__privacy-link,
.matn-cookie-banner__dns-link {
    color: #4f6f52;
    font-weight: 600;
    text-decoration: underline;
}

.matn-cookie-banner__link-sep {
    color: #6a756f;
}

.matn-cookie-banner__dns-optout {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    background: #f7f6f3;
    border: 1px solid #d9d5cb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2a25;
}

.matn-cookie-banner__dns-optout--prefs {
    margin: 8px 0 16px;
}

/* In the slim main bar the opt-out is a compact inline line, not a boxed block. */
.matn-cookie-banner__main .matn-cookie-banner__dns-optout {
    margin: 6px 0 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    align-items: center;
    font-size: 13px;
    line-height: 1.4;
}

.matn-cookie-banner__dns-optout input {
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #4f6f52;
}

.matn-cookie-banner__dns-optout-text {
    flex: 1;
}

.matn-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

/* In the slim main bar the buttons sit in a single right-aligned row. */
.matn-cookie-banner__main .matn-cookie-banner__actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
}

.matn-cookie-banner__btn {
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.matn-cookie-banner__btn--primary {
    background: #4f6f52;
    color: #fff;
}

.matn-cookie-banner__btn--primary:hover {
    background: #3d5640;
}

.matn-cookie-banner__btn--secondary {
    background: #f7f6f3;
    color: #1f2a25;
    border: 1px solid #d9d5cb;
}

.matn-cookie-banner__btn--secondary:hover {
    background: #eceae4;
}

.matn-cookie-banner__category {
    padding: 12px 0;
    border-bottom: 1px solid #eceae4;
}

.matn-cookie-banner__category:last-of-type {
    border-bottom: none;
    margin-bottom: 8px;
}

.matn-cookie-banner__category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.matn-cookie-banner__category-title {
    font-size: 16px;
    color: #1f2a25;
}

.matn-cookie-banner__category-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #6a756f;
    margin: 0;
}

.matn-cookie-banner__badge {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4f6f52;
    background: #e8f0e9;
    padding: 4px 10px;
    border-radius: 999px;
}

/* Toggle */
.matn-cookie-banner__toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.matn-cookie-banner__toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.matn-cookie-banner__toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #c5c0b5;
    border-radius: 26px;
    transition: background 0.2s;
}

.matn-cookie-banner__toggle-slider::before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.matn-cookie-banner__toggle input:checked + .matn-cookie-banner__toggle-slider {
    background: #4f6f52;
}

.matn-cookie-banner__toggle input:checked + .matn-cookie-banner__toggle-slider::before {
    transform: translateX(22px);
}

.matn-cookie-banner__toggle input:focus-visible + .matn-cookie-banner__toggle-slider {
    outline: 2px solid #4f6f52;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .matn-cookie-banner__main {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .matn-cookie-banner__main-content {
        margin-bottom: 4px;
    }
}

@media (max-width: 640px) {
    .matn-cookie-banner__panel {
        padding: 14px 18px;
    }

    .matn-cookie-banner__actions {
        flex-direction: column;
    }

    .matn-cookie-banner__btn {
        width: 100%;
        text-align: center;
    }
}
