body.clc-no-scroll { overflow: hidden !important; }
body.admin-bar #wpadminbar { z-index: 9999999; }

.clc-overlay {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(27, 42, 74, 0.45);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    padding: 1rem; animation: clcFadeIn 250ms ease-out;
}
@keyframes clcFadeIn { from { opacity: 0; } to { opacity: 1; } }

.clc-banner {
    background: #fff; border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
    width: 100%; max-width: 580px; max-height: 90vh;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; padding: 1.75rem;
    animation: clcSlideUp 300ms ease-out;
}
@keyframes clcSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.clc-banner--bottom {
    position: fixed; bottom: 0; left: 0; right: 0; max-width: 100%;
    border-radius: 0.75rem 0.75rem 0 0; animation: clcSlideUpBottom 300ms ease-out;
}
@keyframes clcSlideUpBottom { from { transform: translateY(100%); } to { transform: translateY(0); } }
.clc-banner--bottom .clc-overlay { align-items: flex-end; }

.clc-banner__header { display: flex; align-items: center; gap: 0.65rem; margin-bottom: 0.75rem; }
.clc-banner__icon { color: #0f8fc7; flex-shrink: 0; }
.clc-banner__title { font-size: 1.15rem; font-weight: 700; color: #1B2A4A; margin: 0 0 0.5rem; line-height: 1.3; }
.clc-banner__desc { font-size: 0.9rem; line-height: 1.6; color: #4B5563; margin: 0 0 0.5rem; }
.clc-banner__privacy { font-size: 0.8125rem; color: #6B7280; margin: 0 0 1.25rem; }
.clc-banner__privacy a { color: #0f8fc7; text-decoration: underline; text-underline-offset: 2px; }
.clc-banner__privacy a:hover { color: #1B2A4A; }

.clc-banner__buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.clc-btn {
    flex: 1 1 0; min-width: 0; padding: 0.7rem 1rem;
    font-size: 0.875rem; font-weight: 600; border-radius: 0.5rem;
    border: 2px solid transparent; cursor: pointer;
    transition: all 150ms ease; text-align: center;
    line-height: 1.3; font-family: inherit; white-space: nowrap;
}
.clc-btn--primary,
.clc-btn--secondary { background: #1B2A4A; color: #fff; border-color: #1B2A4A; }
.clc-btn--primary:hover,
.clc-btn--secondary:hover { background: #2A3F6A; border-color: #2A3F6A; }

.clc-banner__back {
    display: inline-flex; align-items: center; gap: 0.35rem;
    background: none; border: none; color: #6B7280; cursor: pointer;
    font-size: 0.8125rem; font-family: inherit; padding: 0;
    margin-bottom: 1rem; transition: color 150ms ease;
}
.clc-banner__back:hover { color: #1B2A4A; }

.clc-category { border: 1px solid #E2E8F0; border-radius: 0.5rem; padding: 0.85rem 1rem; margin-bottom: 0.5rem; }
.clc-category__header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.clc-category__toggle { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.9rem; flex: 1; }
.clc-category__toggle input[type="checkbox"] { display: none; }

.clc-toggle {
    position: relative; width: 38px; height: 22px;
    background: #CBD5E1; border-radius: 11px; flex-shrink: 0;
    transition: background 150ms ease;
}
.clc-toggle::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; background: #fff; border-radius: 50%;
    transition: transform 150ms ease; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
input[type="checkbox"]:checked + .clc-toggle { background: #2A9D8F; }
input[type="checkbox"]:checked + .clc-toggle::after { transform: translateX(16px); }
input[type="checkbox"]:disabled + .clc-toggle { background: #2A9D8F; opacity: 0.6; }

.clc-badge { font-size: 0.7rem; font-weight: 500; color: #2A9D8F; background: rgba(42,157,143,0.1); padding: 0.15rem 0.45rem; border-radius: 0.25rem; white-space: nowrap; }

.clc-category__expand {
    background: none; border: 1px solid #E2E8F0; border-radius: 0.35rem;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #6B7280; transition: all 150ms ease; flex-shrink: 0;
}
.clc-category__expand:hover { border-color: #1B2A4A; color: #1B2A4A; }
.clc-category__expand.is-expanded svg { transform: rotate(180deg); }
.clc-category__desc { font-size: 0.8125rem; color: #6B7280; margin: 0.4rem 0 0; line-height: 1.5; }

.clc-category__table { margin-top: 0.75rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.clc-category__table table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.clc-category__table th { text-align: left; padding: 0.4rem 0.5rem; background: #F5F7FA; color: #374151; font-weight: 600; white-space: nowrap; border-bottom: 1px solid #E2E8F0; }
.clc-category__table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #F3F4F6; color: #4B5563; vertical-align: top; }
.clc-category__table code { font-size: 0.75rem; background: #F5F7FA; padding: 0.1rem 0.35rem; border-radius: 0.2rem; color: #1B2A4A; }

.clc-banner__footer { margin-top: 1rem; padding-top: 0.65rem; border-top: 1px solid #F3F4F6; font-size: 0.7rem; color: #9CA3AF; text-align: center; }
.clc-banner__footer a { color: #9CA3AF; text-decoration: underline; text-underline-offset: 2px; }
.clc-banner__footer a:hover { color: #6B7280; }

.clc-reopen {
    position: fixed; bottom: 5vh; right: 1rem; z-index: 99998;
    width: 60px; height: 60px; border-radius: 50%; background: #fff;
    border: 1px solid #E2E8F0; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #0f8fc7; transition: all 200ms ease;
}

@media only screen and (max-width: 992px){
    .clc-reopen{
        bottom: 10vh;
    }
}

.clc-reopen:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.16); border-color: #0f8fc7; transform: scale(1.05); }

@media (max-width: 480px) {
    .clc-banner { padding: 1.25rem; }
    .clc-banner__buttons { flex-direction: column; }
    .clc-btn { flex: none; width: 100%; white-space: normal; }
    .clc-banner__title { font-size: 1.05rem; }
}
