/* Cookie consent banner + preferences modal (matches Cookie Privacy Notice Banner design)
   Colors are pulled from the site theme: --primary-color (public/front/css/colors/scheme-01.css)
   and the a.btn-main gradient (public/front/css/style.css) so this stays in sync with re-themes. */

.cc-banner,
.cc-modal-overlay {
    box-sizing: border-box;
}
.cc-banner *,
.cc-modal-overlay * {
    box-sizing: border-box;
}

.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    background: var(--primary-color, #0da9e9);
    color: #05202b;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.25);
    font-family: 'Inter', Arial, sans-serif;
}

.cc-banner[hidden] {
    display: none;
}

.cc-banner__text {
    flex: 1 1 480px;
    min-width: 260px;
}

.cc-banner__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
}

.cc-banner__text p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.5;
}

.cc-banner__links a {
    color: #05202b;
    text-decoration: underline;
    font-weight: 600;
}

.cc-banner__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 240px;
}

.cc-btn {
    display: inline-block;
    padding: 12px 22px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(40deg, #00AFEC, #C0DD98);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    transition: filter 0.15s ease, transform 0.05s ease;
}

.cc-btn:hover {
    filter: brightness(0.92);
}

.cc-btn:active {
    transform: scale(0.98);
}

.cc-btn--block {
    width: 100%;
    border-radius: 6px;
}

/* Preferences modal */

.cc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 20, 30, 0.55);
    padding: 20px;
    font-family: 'Inter', Arial, sans-serif;
}

.cc-modal-overlay[hidden] {
    display: none;
}

.cc-modal {
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.cc-modal__body {
    display: flex;
    flex: 1 1 auto;
    min-height: 320px;
    overflow: hidden;
}

.cc-modal__tabs {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e3e3e3;
    background: #fafafa;
}

.cc-tab {
    border: none;
    background: transparent;
    text-align: left;
    padding: 16px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #eee;
}

.cc-tab.is-active {
    background: #fff;
    border-left-color: var(--primary-color, #0da9e9);
    color: var(--primary-color, #0da9e9);
}

.cc-modal__panel {
    flex: 1 1 auto;
    padding: 24px;
    overflow-y: auto;
}

.cc-panel {
    display: none;
}

.cc-panel.is-active {
    display: block;
}

.cc-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cc-panel__head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.cc-panel p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.cc-always-active {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color, #0da9e9);
}

.cc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
}

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

.cc-toggle__slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 999px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.cc-toggle__slider::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cc-toggle input:checked + .cc-toggle__slider {
    background: var(--primary-color, #0da9e9);
}

.cc-toggle input:checked + .cc-toggle__slider::before {
    transform: translateX(20px);
}

.cc-modal__actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #eee;
    border-top: 1px solid #eee;
}

.cc-modal__actions .cc-btn--block {
    border-radius: 0;
    padding: 16px;
}

@media (max-width: 640px) {
    .cc-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 18px;
        max-height: 80vh;
        overflow-y: auto;
    }
    .cc-banner__text {
        flex: none;
        min-width: 0;
    }
    .cc-banner__title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    .cc-banner__text p {
        font-size: 12px;
        margin-bottom: 6px;
    }
    .cc-banner__actions {
        flex: none;
        min-width: 0;
        gap: 8px;
    }
    .cc-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    .cc-modal__body {
        flex-direction: column;
    }
    .cc-modal__tabs {
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #e3e3e3;
    }
    .cc-tab {
        flex: 1 1 0;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: normal;
        text-align: center;
        padding: 10px 6px;
        font-size: 12px;
    }
    .cc-tab.is-active {
        border-bottom-color: var(--primary-color, #0da9e9);
    }
}
