/* =========================================================================
   Cookie consent (GDPR) — self-hosted replacement for Cookiebot.
   Categories: Necessary (always on) + Statistics (Hotjar).
   Styling matches the dark 3d-empire theme. All rules are namespaced under
   .cc- to avoid collisions with theme.css / user.css.
   ========================================================================= */

.cc-banner,
.cc-modal,
.cc-settings-btn {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
}

.cc-banner *,
.cc-modal * {
    box-sizing: border-box;
}

/* ---- Bottom banner --------------------------------------------------- */
.cc-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2147483646; /* above almost everything, below browser chrome */
    max-width: 460px;
    margin-left: auto;
    background: #111;
    color: #f1f1f1;
    border: 1px solid #2c2c2c;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    padding: 1.4rem 1.5rem 1.3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .35s ease, transform .35s ease;
}

.cc-banner.cc-visible {
    opacity: 1;
    transform: translateY(0);
}

.cc-banner h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 .55rem;
    color: #fff;
}

.cc-banner p {
    font-size: .85rem;
    line-height: 1.55;
    margin: 0 0 1.1rem;
    color: #c7c7c7;
}

.cc-banner p a {
    color: #fff;
    text-decoration: underline;
}

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

/* ---- Buttons --------------------------------------------------------- */
.cc-btn {
    flex: 1 1 auto;
    min-width: 120px;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: .7rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.cc-btn-accept {
    background: #fff;
    color: #111;
}

.cc-btn-accept:hover {
    background: #e2e2e2;
}

.cc-btn-reject {
    background: transparent;
    color: #f1f1f1;
    border-color: #555;
}

.cc-btn-reject:hover {
    border-color: #888;
    background: rgba(255, 255, 255, .05);
}

.cc-btn-settings {
    flex: 1 1 100%;
    background: transparent;
    color: #9d9d9d;
    border: none;
    padding: .4rem;
    font-size: .78rem;
    text-decoration: underline;
}

.cc-btn-settings:hover {
    color: #fff;
}

/* ---- Settings modal -------------------------------------------------- */
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: rgba(0, 0, 0, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
}

.cc-modal-overlay.cc-visible {
    opacity: 1;
    pointer-events: auto;
}

.cc-modal {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    background: #141414;
    color: #f1f1f1;
    border: 1px solid #2c2c2c;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}

.cc-modal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 .75rem;
    color: #fff;
}

.cc-modal > p {
    font-size: .88rem;
    line-height: 1.6;
    color: #c7c7c7;
    margin: 0 0 1.4rem;
}

.cc-category {
    border: 1px solid #2c2c2c;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    margin-bottom: .9rem;
    background: #0d0d0d;
}

.cc-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cc-category-head h3 {
    font-size: .98rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.cc-category p {
    font-size: .82rem;
    line-height: 1.55;
    color: #a9a9a9;
    margin: .55rem 0 0;
}

/* ---- Toggle switch --------------------------------------------------- */
.cc-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
}

.cc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #444;
    border-radius: 26px;
    transition: background .25s ease;
}

.cc-slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s ease;
}

.cc-switch input:checked + .cc-slider {
    background: #2e9e5b;
}

.cc-switch input:checked + .cc-slider::before {
    transform: translateX(20px);
}

.cc-switch input:disabled + .cc-slider {
    background: #2e9e5b;
    opacity: .55;
    cursor: not-allowed;
}

.cc-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1.4rem;
}

/* ---- Floating re-open button ---------------------------------------- */
.cc-settings-btn {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 2147483645;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #2c2c2c;
    background: #111;
    color: #fff;
    cursor: pointer;
    display: none; /* shown only after a choice is stored */
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
    transition: transform .2s ease, background .2s ease;
}

.cc-settings-btn:hover {
    transform: scale(1.08);
    background: #1d1d1d;
}

.cc-settings-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.cc-settings-btn.cc-show {
    display: flex;
}

@media (max-width: 575.98px) {
    .cc-banner {
        max-width: none;
    }

    .cc-btn {
        flex: 1 1 100%;
    }
}
