/**
 * Cookie Wall Styles - Scroll normal sur la modale
 */

/* Reset */
#cookiewall-banner,
#cookiewall-banner * {
    box-sizing: border-box;
}

/* Overlay */
.cookiewall-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 999998;
    backdrop-filter: blur(4px);
}

/* Bannière */
.cookiewall-banner {
    position: fixed;
    left: 50%;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;      /* si trop haut → scroll classique */
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 999999;

    overflow-y: auto;      /* scroll normal sur toute la modale */
}

/* Positions */
.cookiewall-bottom {
    bottom: 20px;
    transform: translateX(-50%);
}
.cookiewall-top {
    top: 20px;
    transform: translateX(-50%);
}
.cookiewall-center {
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Container */
.cookiewall-container {
    padding: 32px;
}

/* Vues */
.cookiewall-view {
    /* plus de flex compliqué, on laisse la hauteur naturelle */
}

/* Zones */
.cookiewall-content {
    margin-bottom: 16px;
}

.cookiewall-preferences {
    /* hauteur naturelle, pas de scroll interne */
    margin-top: 10px;
    padding-right: 5px;
    padding-bottom: 5px;
}

/* Boutons */
.cookiewall-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
}

.cookiewall-buttons-custom {
    border-top: 1px solid #e5e7eb;
}

.cookiewall-btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}

.cookiewall-btn-accept {
    background: linear-gradient(135deg, var(--cw-primary) 0%, var(--cw-secondary) 100%);
    color: #fff;
}
.cookiewall-btn-accept:hover {
    background: linear-gradient(135deg, var(--cw-secondary) 0%, var(--cw-primary) 100%);
}

.cookiewall-btn-customize,
.cookiewall-btn-back,
.cookiewall-btn-confirm {
    background: #fff;
    color: var(--cw-primary);
    border: 2px solid #e5e7eb;
}
.cookiewall-btn-customize:hover,
.cookiewall-btn-back:hover,
.cookiewall-btn-confirm:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Items préférences */
.cookiewall-preference-item {
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.cookiewall-preference-item:last-of-type { margin-bottom: 0; }

.cookiewall-preference-text {
    flex: 1;
    text-align: left;
}
.cookiewall-preference-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}
.cookiewall-preference-desc {
    font-size: 12px;
    color: #6b7280;
    display: block;
    line-height: 1.35em;
}

/* Switch */
.cookiewall-switch-label {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cookiewall-checkbox {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 43px;
    height: 23px;
    background: #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: all .3s ease;
}
.cookiewall-checkbox::before {
    content: '';
    position: absolute;
    width: 17px;
    height: 17px;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.2);
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.cookiewall-checkbox:checked {
    background: linear-gradient(135deg, var(--cw-primary) 0%, var(--cw-secondary) 100%);
}
.cookiewall-checkbox:checked::before { left: 23px; }

/* Essentiels */
.cookiewall-preference-item.is-essential {
    background: #f3f4f6;
}
.cookiewall-badge-required {
    font-size: 13px;
    font-weight: 700;
    margin-left: 6px;
}
.cookiewall-checkbox.essential-switch {
    cursor: not-allowed;
    opacity: .8;
}
.cookiewall-checkbox.essential-switch:disabled:checked {
    background: #4f4a4a !important;
}

/* Responsive */
@media (max-width: 768px) {
    .cookiewall-container { padding: 20px; }

    .cookiewall-bottom { bottom: 10px; }
    .cookiewall-top { top: 10px; }

    .cookiewall-title { font-size: 18px; }
    .cookiewall-message,
    .cookiewall-custom-message { font-size: 13px; }

    .cookiewall-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .cookiewall-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
    }
}
