/* Legal Popup Overlay */
#roce-legal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 30, 89, 0.85);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Popup Container */
#roce-legal-popup {
    background: #ffffff;
    border-radius: 12px;
    max-width: 680px;
    width: 100%;
    padding: 40px 36px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* Header */
.roce-popup-header {
    text-align: center;
    margin-bottom: 28px;
}

.roce-popup-logo {
    width: 80px;
    height: auto;
    margin-bottom: 16px;
}

.roce-popup-header h2 {
    color: var(--bleu);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

/* Checkboxes area */
.roce-popup-checkboxes {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.roce-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--bleu);
    padding: 12px 20px;
    border: 2px solid #d0d5e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    user-select: none;
}

.roce-checkbox-label:hover {
    border-color: var(--bleu);
    background: rgba(17, 30, 89, 0.03);
}

.roce-checkbox-label input[type="radio"] {
    display: none;
}

.roce-radio-custom {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid #d0d5e0;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}

.roce-checkbox-label input[type="radio"]:checked ~ .roce-radio-custom {
    border-color: var(--bleu);
    background: var(--bleu);
}

.roce-checkbox-label input[type="radio"]:checked ~ .roce-radio-custom::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.roce-checkbox-label.active {
    border-color: var(--bleu);
    background: rgba(17, 30, 89, 0.05);
}

/* Content area */
.roce-popup-content {
    background: #f5f6fa;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    max-height: 280px;
    overflow-y: auto;
}

.roce-popup-content p {
    font-size: 13px;
    line-height: 1.7;
    color: #333;
    margin: 0 0 12px 0;
    text-align: justify;
    font-family: 'Montserrat', sans-serif;
}

.roce-popup-content p:last-child {
    margin-bottom: 0;
}

.roce-popup-placeholder {
    text-align: center !important;
    color: #888 !important;
    font-style: italic;
}

/* Accept button */
#roce-legal-accept {
    display: block;
    width: 100%;
    padding: 16px;
    background: #d0d5e0;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: not-allowed;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.3px;
}

#roce-legal-accept:not(:disabled) {
    background: var(--bleu);
    cursor: pointer;
}

#roce-legal-accept:not(:disabled):hover {
    background: rgb(25, 42, 120);
    box-shadow: 0 4px 12px rgba(17, 30, 89, 0.3);
}

/* Scrollbar styling for popup content */
.roce-popup-content::-webkit-scrollbar {
    width: 6px;
}

.roce-popup-content::-webkit-scrollbar-track {
    background: transparent;
}

.roce-popup-content::-webkit-scrollbar-thumb {
    background: #c0c4cc;
    border-radius: 3px;
}

#roce-legal-popup::-webkit-scrollbar {
    width: 6px;
}

#roce-legal-popup::-webkit-scrollbar-track {
    background: transparent;
}

#roce-legal-popup::-webkit-scrollbar-thumb {
    background: #c0c4cc;
    border-radius: 3px;
}

/* Hide body scroll when popup is open */
body.roce-popup-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 600px) {
    #roce-legal-popup {
        padding: 28px 20px 24px;
    }

    .roce-popup-checkboxes {
        flex-direction: column;
        gap: 10px;
    }

    .roce-checkbox-label {
        justify-content: center;
    }

    .roce-popup-header h2 {
        font-size: 20px;
    }

    .roce-popup-content {
        max-height: 220px;
        padding: 16px;
    }
}
