/* ========================================
   Cookie Banner — Tech Servizi
   ======================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--dark, #1a1a1a);
    color: #fff;
    font-family: var(--font, 'Inter', system-ui, sans-serif);
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
}

.cookie-banner.visible {
    transform: translateY(0);
}

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

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.85);
}

.cookie-banner-text a {
    color: var(--accent-light, #F9B165);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.cookie-banner-text a:hover {
    color: var(--accent, #F68712);
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font, 'Inter', system-ui, sans-serif);
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(.4,0,.2,1);
    letter-spacing: 0.01em;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #F68712, #F9B165);
    color: #fff;
    box-shadow: 0 2px 12px rgba(246,135,18,0.3);
}

.cookie-btn-accept:hover {
    box-shadow: 0 4px 20px rgba(246,135,18,0.5);
    transform: translateY(-1px);
}

.cookie-btn-reject {
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.2);
}

.cookie-btn-reject:hover {
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}

.cookie-btn-settings {
    background: transparent;
    color: rgba(255,255,255,0.5);
    padding: 10px 14px;
    font-weight: 500;
    font-size: 0.8rem;
}

.cookie-btn-settings:hover {
    color: rgba(255,255,255,0.8);
}

/* Settings panel */
.cookie-settings {
    display: none;
    padding: 0 24px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-settings.open {
    display: block;
}

.cookie-settings-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cookie-settings-group:last-child {
    border-bottom: none;
}

.cookie-settings-label {
    flex: 1;
}

.cookie-settings-label strong {
    display: block;
    font-size: 0.85rem;
    color: #fff;
    margin-bottom: 2px;
}

.cookie-settings-label span {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 16px;
}

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 24px;
    transition: 0.3s;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, #F68712, #F9B165);
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Mobile */
@media (max-width: 640px) {
    .cookie-banner-inner {
        padding: 16px;
        gap: 14px;
    }
    .cookie-banner-text {
        font-size: 0.82rem;
        min-width: 100%;
    }
    .cookie-banner-actions {
        width: 100%;
        justify-content: stretch;
    }
    .cookie-btn {
        flex: 1;
        text-align: center;
        padding: 12px 16px;
    }
}
