/* ========================================
   TFC Cookie Banner & Preferences Modal
   Tema dark coerente con il sito
   ======================================== */

/* Banner */
.tfc-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(10, 15, 30, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    padding: 24px 0;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tfc-cookie-banner.visible {
    transform: translateY(0);
}

.tfc-cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.tfc-cookie-banner-text {
    flex: 1;
}

.tfc-cookie-banner-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.tfc-cookie-banner-desc {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
}

.tfc-cookie-banner-desc a {
    color: rgba(245, 158, 11, 0.8);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tfc-cookie-banner-desc a:hover {
    color: #f59e0b;
}

.tfc-cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.tfc-cookie-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.tfc-cookie-btn-accept {
    background: #f59e0b;
    color: #0a0f1e;
}

.tfc-cookie-btn-accept:hover {
    background: #fbbf24;
    transform: translateY(-1px);
}

.tfc-cookie-btn-reject {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tfc-cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.tfc-cookie-btn-customize {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 16px;
}

.tfc-cookie-btn-customize:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

/* Modal Overlay */
.tfc-cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tfc-cookie-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.tfc-cookie-modal {
    background: #0f172a;
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.tfc-cookie-modal-overlay.visible .tfc-cookie-modal {
    transform: scale(1) translateY(0);
}

.tfc-cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tfc-cookie-modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.tfc-cookie-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.tfc-cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Cookie Categories */
.tfc-cookie-category {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tfc-cookie-category:last-of-type {
    border-bottom: none;
}

.tfc-cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.tfc-cookie-category-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.tfc-cookie-category-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}

/* Toggle Switch */
.tfc-cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.tfc-cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.tfc-cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.tfc-cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s;
}

.tfc-cookie-toggle input:checked + .tfc-cookie-toggle-slider {
    background: #f59e0b;
}

.tfc-cookie-toggle input:checked + .tfc-cookie-toggle-slider::before {
    transform: translateX(20px);
}

.tfc-cookie-toggle input:disabled + .tfc-cookie-toggle-slider {
    opacity: 0.5;
    cursor: default;
}

.tfc-cookie-toggle input:disabled:checked + .tfc-cookie-toggle-slider {
    background: rgba(245, 158, 11, 0.5);
}

.tfc-cookie-always-on {
    font-size: 0.72rem;
    color: rgba(245, 158, 11, 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal Footer */
.tfc-cookie-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.tfc-cookie-btn-save {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.tfc-cookie-btn-save:hover {
    background: rgba(255, 255, 255, 0.12);
}

.tfc-cookie-btn-modal-accept {
    background: #f59e0b;
    color: #0a0f1e;
}

.tfc-cookie-btn-modal-accept:hover {
    background: #fbbf24;
}

/* Responsive */
@media (max-width: 768px) {
    .tfc-cookie-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .tfc-cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .tfc-cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .tfc-cookie-modal {
        width: 95%;
        max-height: 90vh;
    }
}
