.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.97); /* Slate 900 con opacità elevata per contrasto e conformità */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #f8fafc;
    padding: 1.5rem;
    z-index: 99999;
    box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
}

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

.cookie-banner.hidden {
    display: none;
}

/* Close Button (X) */
.cookie-banner-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    padding: 5px;
}

.cookie-banner-close:hover {
    color: #fff;
    transform: scale(1.1);
}

.cookie-banner-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-banner-text {
    flex: 1 1 500px;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.cookie-policy-inline-link {
    color: #f59e0b;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.cookie-policy-inline-link:hover {
    color: #fbbf24;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-cookie {
    padding: 0.65rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Equal dignity buttons styling */
.btn-accept {
    background-color: #f59e0b;
    color: #0f172a;
}

.btn-accept:hover {
    background-color: #fbbf24;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-reject {
    background-color: #334155;
    border: 1px solid #475569;
    color: #f1f5f9;
}

.btn-reject:hover {
    background-color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-customize {
    background-color: transparent;
    border: 1px solid #475569;
    color: #cbd5e1;
}

.btn-customize:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: #94a3b8;
    color: #fff;
    transform: translateY(-1px);
}

/* Preferences Panel */
.cookie-preferences {
    max-width: 1100px;
    margin: 1.5rem auto 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.cookie-preferences.hidden {
    display: none;
}

.cookie-preferences h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f8fafc;
}

.cookie-preferences > p {
    margin: 0 0 1.25rem 0;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.5;
}

.cookie-preference-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-pref-option {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
}

.cookie-pref-desc {
    margin: 0.5rem 0 0 0;
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Custom Toggle Switch */
.cookie-switch-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    color: #e2e8f0;
    user-select: none;
    gap: 10px;
}

.cookie-switch-label input {
    display: none;
}

.cookie-switch-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    background-color: #475569;
    border-radius: 20px;
    transition: background-color 0.2s;
}

.cookie-switch-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.cookie-switch-label input:checked + .cookie-switch-slider {
    background-color: #f59e0b;
}

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

.cookie-switch-label input:disabled + .cookie-switch-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-pref-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-save-pref {
    background-color: #10b981;
    color: #fff;
    border: none;
}

.btn-save-pref:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-actions {
        justify-content: stretch;
        width: 100%;
    }
    .cookie-actions .btn-cookie {
        flex: 1 1 120px;
    }
}
