/* BackgammonWorld Cookie Popup */

#ccp-overlay,
#ccp-overlay * {
    box-sizing: border-box;
}

#ccp-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.65);
    font-family: -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Arial, sans-serif;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s ease, visibility .3s ease;
}

#ccp-overlay.ccp-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#ccp-box {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 36px 32px 28px;
    background: #1a1a2e;
    color: #e0e0e0;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .4);
    transform: scale(.9) translateY(20px);
    transition: transform .3s ease;
}

#ccp-overlay.ccp-visible #ccp-box {
    transform: scale(1) translateY(0);
}

#ccp-icon {
    display: block;
    font-size: 38px;
    margin-bottom: 16px;
}

#ccp-box h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

#ccp-intro {
    margin: 0 0 24px;
    color: #aaa;
    font-size: 14px;
    line-height: 1.7;
}

#ccp-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#ccp-box button {
    font-family: inherit;
    cursor: pointer;
}

#ccp-accept,
#ccp-reject,
#ccp-save {
    display: block;
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 13px 12px;
    font-size: 15px;
    font-weight: 600;
    transition: background .2s ease;
}

#ccp-accept {
    background: #16a34a;
    color: #fff;
}

#ccp-accept:hover {
    background: #15803d;
}

#ccp-reject {
    background: #32324c;
    color: #fff;
}

#ccp-reject:hover {
    background: #41415d;
}

#ccp-select-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    background: transparent;
    border: 1px solid #3a3a55;
    border-radius: 6px;
    color: #b8b8c8;
    font-size: 13px;
}

#ccp-select-toggle:hover {
    color: #fff;
    background: #2a2a44;
}

#ccp-select-toggle .ccp-caret {
    font-size: 10px;
    transition: transform .25s;
}

#ccp-select-toggle.ccp-open .ccp-caret {
    transform: rotate(180deg);
}

#ccp-categories {
    display: none;
    margin-top: 18px;
    padding-top: 18px;
    text-align: left;
    border-top: 1px solid #2a2a44;
}

#ccp-categories.ccp-open {
    display: block;
}

.ccp-cat {
    padding: 12px 0;
    border-bottom: 1px solid #292940;
}

.ccp-cat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ccp-cat-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #16a34a;
    cursor: pointer;
}

.ccp-cat-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

.ccp-cat-required {
    color: #a9a9b9;
    font-size: 11px;
    background: #292940;
    padding: 3px 7px;
    border-radius: 10px;
}

.ccp-cat-desc {
    margin: 6px 0 0 28px;
    color: #9a9aaf;
    font-size: 12px;
    line-height: 1.6;
}

#ccp-save {
    margin-top: 18px;
    background: #2563eb;
    color: #fff;
}

#ccp-save:hover {
    background: #1d4ed8;
}

#ccp-overlay button:focus-visible,
#ccp-overlay input:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    #ccp-box {
        padding: 28px 20px 22px;
    }

    #ccp-box h3 {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ccp-overlay,
    #ccp-box,
    #ccp-select-toggle .ccp-caret {
        transition: none;
    }
}