/* Banner principale */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: white;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    font-family: Arial, Helvetica, sans-serif;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.cookie-banner-content p {
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.cookie-banner a {
    color: #ffcc00;
    text-decoration: underline;
}

.cookie-banner a:hover {
    color: #ffaa00;
}

/* Pulsanti del banner */
.cookie-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.cookie-buttons .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cookie-buttons .btn-primary {
    background: #e0461a;  /* Usa il colore del tuo brand */
    color: white;
}

.cookie-buttons .btn-primary:hover {
    background: #c43c15;
}

.cookie-buttons .btn-secondary {
    background: #6c757d;
    color: white;
}

.cookie-buttons .btn-secondary:hover {
    background: #545b62;
}

.cookie-buttons .btn-link {
    background: transparent;
    color: #ffcc00;
    text-decoration: underline;
}

.cookie-buttons .btn-link:hover {
    color: #ffaa00;
}



/* Pannello preferenze (dialog) */
.preferences-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    color: #333;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    border-radius: 15px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.preferences-dialog.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.dialog-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.dialog-header h3 {
    margin: 0;
    font-size: 18px;
    color: #0b4f8a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

.dialog-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    text-align: right;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.dialog-footer .btn-primary {
    background: #e0461a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.dialog-footer .btn-primary:hover {
    background: #c43c15;
}

/* Categorie cookie */
.cookie-category {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-trigger {
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.accordion-trigger:hover {
    background: #e9ecef;
}

.accordion-content {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.accordion-content.visible {
    max-height: 500px;
    padding: 15px;
}

.always-active {
    color: #28a745;
    font-size: 12px;
    font-weight: normal;
}

/* Tabella cookie */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 10px;
}

.cookie-table th,
.cookie-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.cookie-table th {
    background: #f1f1f1;
    font-weight: 600;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #e0461a; /* colore brand */
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Bottone Gestisci cookie nel footer */
.cookie-footer-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    margin: 0 5px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    font-family: inherit;
}

.cookie-footer-btn:hover {
    color: #ffcc00;
    text-decoration: underline;
}


/* Stili per i link legali nel footer (se usi generatePolicyLinks) */
.cookie-footer-links {
    margin-top: 15px;
    text-align: center;
}
.cookie-footer-links a {
    color: #ffcc00;
    margin: 0 10px;
    text-decoration: none;
}
.cookie-footer-links a:hover {
    text-decoration: underline;
}

input::placeholder,
textarea::placeholder {
    color: #555 !important;   
    opacity: 1;              
}