/* ── Cookie consent — flat single-color modal, two-tone theme ── */

.cc-root {
    position: fixed;
    z-index: 100;
    font-family: inherit;
}

/* ── Bottom sheet banner ── */
.cc-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    max-width: 580px;
    margin: 0 auto;
    background: var(--surface-1);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    transform: translateY(140%);
    opacity: 0;
    transition: transform 0.4s var(--ease), opacity 0.3s;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cc-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cc-banner-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cc-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--fg);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.cc-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--fg);
    letter-spacing: -0.01em;
}

.cc-text {
    font-size: 0.86rem;
    color: var(--fg-70);
    line-height: 1.6;
}

.cc-text a {
    color: var(--fg);
    text-decoration: underline;
    text-decoration-color: var(--fg-25);
    text-underline-offset: 3px;
}

.cc-text a:hover {
    text-decoration-color: var(--fg);
}

.cc-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cc-btn {
    flex: 1 1 auto;
    min-width: 110px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
}

.cc-btn-primary {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}

.cc-btn-primary:hover {
    background: rgba(245, 245, 245, 0.9);
}

.cc-btn-ghost {
    background: transparent;
    color: var(--fg-70);
    border-color: var(--border-strong);
}

.cc-btn-ghost:hover {
    color: var(--fg);
    border-color: var(--border-hover);
    background: var(--surface-2);
}

/* ── Modal — flat, single surface, no inner borders ── */
.cc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
}

.cc-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.cc-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -45%) scale(0.96);
    z-index: 100;
    width: min(540px, calc(100vw - 32px));
    max-height: 85vh;
    background: var(--surface-1);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cc-modal.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.cc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 6px;
    background: transparent;
}

.cc-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--fg);
}

.cc-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--fg-55);
    cursor: pointer;
    transition: all 0.2s;
}

.cc-close:hover {
    background: var(--surface-2);
    color: var(--fg);
}

.cc-modal-body {
    padding: 8px 22px 6px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cc-cat {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    transition: none;
}

.cc-cat:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.cc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cc-cat-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-cat-required {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--fg-55);
    padding: 2px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
}

.cc-cat-desc {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--fg-55);
    line-height: 1.55;
}

/* ── Toggle switch ── */
.cc-toggle {
    position: relative;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
}

.cc-toggle input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.cc-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--surface-3);
    border-radius: 999px;
    transition: background 0.2s;
}

.cc-toggle-thumb {
    position: absolute;
    top: 50%;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--fg-55);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: left 0.22s var(--ease), background 0.2s;
}

.cc-toggle input:checked+.cc-toggle-track {
    background: var(--fg);
}

.cc-toggle input:checked+.cc-toggle-track .cc-toggle-thumb {
    left: 19px;
    background: var(--bg);
}

.cc-toggle input:disabled {
    cursor: not-allowed;
}

.cc-toggle input:disabled+.cc-toggle-track {
    opacity: 0.5;
}

.cc-modal-foot {
    display: flex;
    gap: 8px;
    padding: 12px 22px 20px;
    background: transparent;
}

.cc-modal-foot .cc-btn {
    flex: 1;
}

/* ── Reopener pill ── */
.cc-reopen {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--surface-1);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--fg-55);
    font-size: 0.74rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s, transform 0.3s, color 0.2s, border-color 0.2s;
}

.cc-reopen.show {
    opacity: 0.7;
    transform: translateY(0);
}

.cc-reopen:hover {
    opacity: 1;
    color: var(--fg);
    border-color: var(--border-hover);
}

/* ── Responsive ── */
@media (max-width: 580px) {
    .cc-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 18px 20px;
    }

    .cc-actions {
        flex-direction: column;
    }

    .cc-btn {
        width: 100%;
    }

    .cc-modal-foot {
        flex-direction: column;
    }

    .cc-reopen {
        font-size: 0.72rem;
        padding: 6px 10px;
    }
}