/* CC Cookie Consent – Modal Version */

/* Overlay behind the modal */
.cc-cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    z-index: 99998;
}

/* Main modal (centered) */
.cc-cookie-modal-main {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    pointer-events: none; /* let overlay catch clicks, but box catches its own */
}

.cc-cookie-modal-main .cc-cookie-modal-box {
    pointer-events: auto;
}

/* Shared modal box styling */
.cc-cookie-modal-box {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.35);
    animation: ccModalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #333;
    overflow: hidden;
}

@keyframes ccModalPop {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Main modal specific */
.cc-cookie-modal-main .cc-cookie-modal-box {
    text-align: center;
    padding: 40px 36px 36px;
}

.cc-cookie-modal-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 16px;
}

.cc-cookie-modal-main h3 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

.cc-cookie-modal-main p {
    margin: 0 0 28px 0;
    color: #555;
    font-size: 14px;
}

.cc-cookie-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* Buttons */
.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.cc-btn-accept {
    background: #000000;
    color: #ffffff;
}

.cc-btn-accept:hover {
    background: #333333;
    transform: translateY(-1px);
}

.cc-btn-reject {
    background: transparent;
    color: #555;
    border: 1px solid #ccc;
}

.cc-btn-reject:hover {
    background: #f5f5f5;
    border-color: #999;
}

.cc-btn-customize {
    background: transparent;
    color: #000;
    text-decoration: underline;
    padding: 12px 16px;
}

.cc-btn-customize:hover {
    color: #555;
}

/* Preferences Modal */
.cc-cookie-modal-prefs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}

.cc-cookie-modal-prefs .cc-cookie-modal-box {
    max-height: 90vh;
    overflow-y: auto;
    text-align: left;
}

.cc-cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px 0;
}

.cc-cookie-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.cc-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.cc-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.cc-cookie-modal-body {
    padding: 16px 28px;
}

.cc-cookie-category {
    border-bottom: 1px solid #eee;
    padding: 16px 0;
}

.cc-cookie-category:last-child {
    border-bottom: none;
}

.cc-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cc-cat-title {
    font-weight: 700;
    font-size: 15px;
    color: #222;
}

.cc-cat-desc {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* Toggle Switch */
.cc-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

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

.cc-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 26px;
}

.cc-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cc-toggle input:checked + .cc-toggle-slider {
    background-color: #000000;
}

.cc-toggle input:focus + .cc-toggle-slider {
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

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

.cc-toggle input:disabled + .cc-toggle-slider {
    opacity: 0.4;
    cursor: not-allowed;
}

.cc-cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 28px 28px;
    border-top: 1px solid #eee;
}

/* Hide transition */
.cc-cookie-modal-main.cc-hidden,
.cc-cookie-overlay.cc-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cc-cookie-modal-main.cc-hidden .cc-cookie-modal-box {
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

/* Mobile */
@media (max-width: 600px) {
    .cc-cookie-modal-main .cc-cookie-modal-box {
        padding: 32px 24px 28px;
    }
    .cc-cookie-modal-main h3 {
        font-size: 20px;
    }
    .cc-cookie-modal-actions {
        flex-direction: column;
    }
    .cc-btn {
        width: 100%;
    }
    .cc-cookie-modal-prefs .cc-cookie-modal-box {
        max-height: 95vh;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cc-cookie-modal-box {
        background: #1a1a1a;
        color: #ddd;
    }
    .cc-cookie-modal-main h3,
    .cc-cookie-modal-header h3 { color: #fff; }
    .cc-cookie-modal-main p { color: #aaa; }
    .cc-cat-title { color: #eee; }
    .cc-cat-desc { color: #888; }
    .cc-cookie-category { border-color: #333; }
    .cc-cookie-modal-footer { border-color: #333; }
    .cc-btn-reject { border-color: #444; color: #ccc; }
    .cc-btn-reject:hover { background: #222; }
}
