/* ============================================
   CET Cookie Consent - Styles
   Matching Bootstrap Italia / Tema CET design
   ============================================ */

:root {
    --ccc-primary: #003580;
    --ccc-primary-dark: #002856;
    --ccc-primary-light: #0059b3;
    --ccc-text: #333;
    --ccc-text-muted: #666;
    --ccc-bg: #fff;
    --ccc-border: #e0e0e0;
    --ccc-success: #198754;
    --ccc-radius: 6px;
}

/* ---- Overlay ---- */
.ccc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
}

/* ---- Banner (bottom bar) ---- */
.ccc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: var(--ccc-bg);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Titillium Web', sans-serif;
}

.ccc-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.ccc-banner-text {
    flex: 1;
}

.ccc-banner-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ccc-primary);
    margin: 0 0 8px;
}

.ccc-banner-text p {
    font-size: 0.9rem;
    color: var(--ccc-text-muted);
    line-height: 1.5;
    margin: 0;
}

.ccc-links a {
    color: var(--ccc-primary);
    text-decoration: underline;
    font-weight: 500;
}

.ccc-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

/* ---- Buttons ---- */
.ccc-btn {
    font-family: 'Titillium Web', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.ccc-btn-primary {
    background: var(--ccc-primary);
    color: #fff;
    border-color: var(--ccc-primary);
}

.ccc-btn-primary:hover {
    background: var(--ccc-primary-dark);
    border-color: var(--ccc-primary-dark);
}

.ccc-btn-outline {
    background: transparent;
    color: var(--ccc-primary);
    border-color: var(--ccc-primary);
}

.ccc-btn-outline:hover {
    background: var(--ccc-primary);
    color: #fff;
}

.ccc-btn-link {
    background: none;
    color: var(--ccc-primary);
    border: none;
    padding: 10px 12px;
    text-decoration: underline;
}

.ccc-btn-link:hover {
    color: var(--ccc-primary-dark);
}

/* ---- Settings Panel (modal) ---- */
.ccc-settings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ccc-settings-inner {
    background: var(--ccc-bg);
    border-radius: var(--ccc-radius);
    max-width: 640px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-family: 'Titillium Web', sans-serif;
}

.ccc-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid var(--ccc-primary);
}

.ccc-settings-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ccc-primary);
}

.ccc-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--ccc-text-muted);
    padding: 0 4px;
    line-height: 1;
}

.ccc-close:hover {
    color: var(--ccc-primary);
}

.ccc-settings-body {
    padding: 20px 24px;
}

.ccc-settings-intro {
    font-size: 0.88rem;
    color: var(--ccc-text-muted);
    line-height: 1.6;
    margin: 0 0 20px;
}

/* ---- Category rows ---- */
.ccc-category {
    border-bottom: 1px solid var(--ccc-border);
    padding: 16px 0;
}

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

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

.ccc-category-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ccc-text);
}

.ccc-category-desc {
    font-size: 0.85rem;
    color: var(--ccc-text-muted);
    line-height: 1.5;
    margin: 0;
}

.ccc-always-on {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ccc-success);
    background: rgba(25, 135, 84, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
}

/* ---- Toggle switch ---- */
.ccc-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

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

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

.ccc-toggle input:checked + .ccc-toggle-slider {
    background: var(--ccc-primary);
}

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

/* ---- Settings footer ---- */
.ccc-settings-footer {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--ccc-border);
    background: #f8f9fa;
    border-radius: 0 0 var(--ccc-radius) var(--ccc-radius);
}

/* ---- Reopen button ---- */
.ccc-reopen {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ccc-primary);
    color: #fff;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ccc-reopen:hover {
    background: var(--ccc-primary-dark);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .ccc-banner-inner {
        flex-direction: column;
        padding: 20px;
        gap: 16px;
    }

    .ccc-banner-text h3 {
        font-size: 1rem;
    }

    .ccc-banner-text p {
        font-size: 0.85rem;
    }

    .ccc-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .ccc-btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    .ccc-settings {
        padding: 0;
        align-items: flex-end;
    }

    .ccc-settings-inner {
        max-height: 85vh;
        border-radius: var(--ccc-radius) var(--ccc-radius) 0 0;
    }

    .ccc-settings-header {
        padding: 16px 20px;
    }

    .ccc-settings-body {
        padding: 16px 20px;
    }

    .ccc-settings-footer {
        flex-direction: column;
        padding: 12px 20px;
    }

    .ccc-settings-footer .ccc-btn {
        width: 100%;
        text-align: center;
    }

    .ccc-reopen {
        bottom: 16px;
        left: 16px;
    }
}

@media (max-width: 400px) {
    .ccc-banner-inner {
        padding: 16px;
    }

    .ccc-category-header {
        flex-wrap: wrap;
        gap: 8px;
    }
}
