.ccc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999998;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ccc-notice {
    position: relative;
    background: #fff;
    color: #222;
    padding: 28px 32px 24px;
    max-width: 520px;
    width: 100%;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    line-height: 1.6;
    animation: cccSlideUp 0.35s ease-out;
}

@keyframes cccSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ccc-notice-text {
    margin-bottom: 16px;
}

.ccc-notice-text,
.ccc-notice-text p {
    color: #222 !important;
}

.ccc-notice-text p {
    margin: 0 0 8px;
}

.ccc-notice-note {
    font-size: 12px;
    color: #666 !important;
    margin: 6px 0 0;
}

.ccc-notice-link {
    color: #2c6b2f;
    text-decoration: underline;
    cursor: pointer;
}

.ccc-notice-link:hover {
    text-decoration: none;
}

.ccc-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ccc-btn {
    padding: 10px 22px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s;
    line-height: 1.4;
}

.ccc-btn-accept {
    background: #2c6b2f;
    color: #fff;
}

.ccc-btn-accept:hover {
    background: #1f5222;
}

.ccc-btn-decline {
    background: #e0e0e0;
    color: #333;
}

.ccc-btn-decline:hover {
    background: #ccc;
}

.ccc-btn-settings {
    background: transparent;
    color: #666;
    border: 1px solid #bbb;
}

.ccc-btn-settings:hover {
    background: #f5f5f5;
}

.ccc-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    margin: 16px;
    max-height: 90vh;
    overflow-y: auto;
    animation: cccFadeIn 0.25s ease-out;
}

@keyframes cccFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ccc-modal-header {
    padding: 24px 28px 0;
}

.ccc-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #222;
}

.ccc-modal-body {
    padding: 8px 28px;
}

.ccc-modal-footer {
    padding: 0 28px 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.ccc-category:last-of-type {
    border-bottom: none;
}

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

.ccc-category-title {
    font-weight: 600;
    font-size: 15px;
    color: #222;
}

.ccc-category-desc {
    font-size: 13px;
    color: #333 !important;
    margin: 0;
    line-height: 1.5;
    padding-right: 52px;
}

.ccc-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.ccc-toggle input:focus-visible + .ccc-toggle-slider {
    outline: 2px solid #2c6b2f;
    outline-offset: 2px;
}

.ccc-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.2s;
}

.ccc-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}

.ccc-toggle input:checked + .ccc-toggle-slider {
    background: #2c6b2f;
}

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

.ccc-toggle.disabled {
    opacity: 0.5;
}

.ccc-toggle.disabled input,
.ccc-toggle.disabled .ccc-toggle-slider {
    cursor: not-allowed;
}

.ccc-toggle.disabled input:checked + .ccc-toggle-slider {
    background: #ccc;
}

.ccc-floating-btn {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 999997;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #222;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    line-height: 1;
}

.ccc-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ccc-floating-btn:focus-visible {
    outline: 2px solid #2c6b2f;
    outline-offset: 2px;
}

@media (min-width: 600px) {
    .ccc-overlay {
        align-items: center;
    }

    .ccc-notice {
        border-radius: 16px;
        margin: 16px;
    }
}

/* Dark theme support */
html.dark .ccc-notice,
html.dark .ccc-modal {
    background: #1e1e1e;
}

html.dark .ccc-notice,
html.dark .ccc-notice-text,
html.dark .ccc-notice-text p,
html.dark .ccc-notice-note,
html.dark .ccc-category-title,
html.dark .ccc-category-desc,
html.dark .ccc-modal-header h2 {
    color: #e0e0e0 !important;
}

html.dark .ccc-notice-link {
    color: #66bb6a !important;
}

html.dark .ccc-btn-decline {
    background: #444;
    color: #e0e0e0 !important;
}

html.dark .ccc-btn-decline:hover {
    background: #555;
}

html.dark .ccc-btn-settings {
    color: #bbb !important;
    border-color: #666;
}

html.dark .ccc-btn-settings:hover {
    background: #333;
}

html.dark .ccc-category {
    border-bottom-color: #333;
}

html.dark .ccc-toggle-slider {
    background: #555;
}

html.dark .ccc-floating-btn {
    background: #2c2c2c;
    color: #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
