/* Estilos del modal en el frontend */
.xplus-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    overflow-y: auto;
}

.xplus-modal.xplus-active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.xplus-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
}

.xplus-modal-content {
    position: relative;
    background: #fff;
    max-width: 600px;
    width: 90%;
    margin: 20px auto;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.xplus-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f5;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #000;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.xplus-modal-close:hover {
    background: #000;
    color: #fff;
}

.xplus-modal-title {
    margin: 0 0 24px;
    font-size: 28px;
    color: #000;
    font-weight: 600;
    padding-right: 50px;
}

.xplus-modal-body {
    margin-bottom: 32px;
    font-size: 16px;
    line-height: 1.6;
    color: #000;
}

.xplus-modal-body p:last-child {
    margin-bottom: 0;
}

.xplus-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.xplus-modal-btn {
    padding: 14px 32px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.xplus-modal-cancel {
    background: #fff;
    color: #000;
    border-color: #000;
}

.xplus-modal-cancel:hover {
    background: #000;
    color: #fff;
}

.xplus-modal-accept {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

.xplus-modal-accept:hover {
    background: #16a34a;
    border-color: #16a34a;
}

.xplus-modal-link {
    background: #000;
    color: #fff;
    border-color: #000;
}

.xplus-modal-link:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

/* Animaciones */
@keyframes xplusFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes xplusSlideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .xplus-modal-content {
        margin: 20px auto;
        padding: 30px 20px;
        width: calc(100% - 40px);
        max-width: calc(100% - 40px);
        max-height: 85vh;
        border-radius: 16px;
    }
    
    .xplus-modal-title {
        font-size: 22px;
        padding-right: 45px;
    }
    
    .xplus-modal-body {
        font-size: 15px;
    }
    
    .xplus-modal-footer {
        flex-direction: column;
    }
    
    .xplus-modal-btn {
        width: 100%;
        text-align: center;
        border-radius: 10px;
    }
    
    .xplus-modal-close {
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

/* Prevenir scroll cuando el modal está activo */
body.xplus-modal-open {
    overflow: hidden;
}
