/* ALIS Cookie Consent System - CSS */
/* Versione: 1.0.0 | Conforme GDPR | ALIS SRLS */

/* ==================== COOKIE BANNER ==================== */

.alis-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideUp 0.4s ease-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alis-cookie-banner__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.alis-cookie-banner__content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.alis-cookie-banner__icon {
    flex-shrink: 0;
    color: #4a90e2;
}

.alis-cookie-banner__text {
    flex: 1;
}

.alis-cookie-banner__title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.alis-cookie-banner__description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.alis-cookie-banner__link {
    color: #4a90e2;
    text-decoration: underline;
    transition: color 0.2s;
}

.alis-cookie-banner__link:hover {
    color: #357abd;
}

.alis-cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.alis-cookie-banner__btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.alis-cookie-banner__btn--primary {
    background: #4a90e2;
    color: #ffffff;
}

.alis-cookie-banner__btn--primary:hover {
    background: #357abd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.alis-cookie-banner__btn--secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.alis-cookie-banner__btn--secondary:hover {
    background: #e8e8e8;
    border-color: #ccc;
}

/* ==================== COOKIE SETTINGS MODAL ==================== */

.alis-cookie-settings {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.alis-cookie-settings__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.alis-cookie-settings__modal {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alis-cookie-settings__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #eee;
}

.alis-cookie-settings__header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
}

.alis-cookie-settings__close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    border-radius: 4px;
}

.alis-cookie-settings__close:hover {
    color: #333;
    background: #f5f5f5;
}

.alis-cookie-settings__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.alis-cookie-settings__intro {
    margin: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* ==================== COOKIE CATEGORIES ==================== */

.alis-cookie-category {
    margin-bottom: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.alis-cookie-category__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.alis-cookie-category__title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.alis-cookie-category__description {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
}

/* ==================== TOGGLE SWITCH ==================== */

.alis-cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

.alis-cookie-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.alis-cookie-toggle__slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.alis-cookie-toggle input:checked + .alis-cookie-toggle__slider {
    background-color: #4a90e2;
}

.alis-cookie-toggle input:checked + .alis-cookie-toggle__slider:before {
    transform: translateX(24px);
}

.alis-cookie-toggle input:disabled + .alis-cookie-toggle__slider {
    background-color: #4a90e2;
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== SETTINGS FOOTER ==================== */

.alis-cookie-settings__footer {
    padding: 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ==================== SETTINGS TRIGGER BUTTON ==================== */

.alis-cookie-settings-trigger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #4a90e2;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alis-cookie-settings-trigger:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

@media (max-width: 768px) {
    .alis-cookie-banner__container {
        padding: 20px;
    }

    .alis-cookie-banner__content {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 16px;
    }

    .alis-cookie-banner__actions {
        flex-direction: column;
    }

    .alis-cookie-banner__btn {
        width: 100%;
        justify-content: center;
    }

    .alis-cookie-settings__modal {
        width: 95%;
        max-height: 95vh;
    }

    .alis-cookie-settings__header,
    .alis-cookie-settings__body,
    .alis-cookie-settings__footer {
        padding: 16px;
    }

    .alis-cookie-category__header {
        flex-direction: column;
        gap: 12px;
    }

    .alis-cookie-settings-trigger {
        bottom: 16px;
        left: 16px;
        width: 44px;
        height: 44px;
    }
}

/* ==================== ACCESSIBILITY ==================== */

.alis-cookie-banner__btn:focus,
.alis-cookie-settings__close:focus,
.alis-cookie-settings-trigger:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

.alis-cookie-toggle input:focus + .alis-cookie-toggle__slider {
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* ==================== PRINT ==================== */

@media print {
    .alis-cookie-banner,
    .alis-cookie-settings,
    .alis-cookie-settings-trigger {
        display: none !important;
    }
}
