/**
 * Estilos del Modal de Descarga
 */

/* Overlay del modal */
.evox-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.evox-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.evox-modal-open {
    overflow: hidden;
}

/* Contenedor del modal */
.evox-modal-container {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.evox-modal-overlay.active .evox-modal-container {
    transform: translateY(0);
}

/* Botón de cerrar */
.evox-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 10;
}

.evox-modal-close:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Contenido del modal */
.evox-modal-content {
    padding: 40px;
}

/* Header del modal */
.evox-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}

.modal-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Formulario */
.evox-download-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.evox-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.evox-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

.evox-form-group input[type="text"],
.evox-form-group input[type="email"] {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #0f172a;
    transition: all 0.2s ease;
    background: white;
}

.evox-form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.evox-form-group input.error {
    border-color: #ef4444;
}

.evox-form-group input.valid {
    border-color: #10b981;
}

.evox-form-group input::placeholder {
    color: #94a3b8;
}

.evox-field-error {
    font-size: 13px;
    color: #ef4444;
    display: none;
}

/* Checkbox */
.evox-checkbox-group {
    flex-direction: row;
}

.evox-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

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

.evox-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
}

.evox-checkbox-label input:checked + .evox-checkbox-custom {
    background: #2563eb;
    border-color: #2563eb;
}

.evox-checkbox-label input:checked + .evox-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Botón de submit */
.evox-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.evox-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4);
}

.evox-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.evox-submit-btn.loading {
    background: #64748b;
}

.evox-submit-btn.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Nota de privacidad */
.evox-privacy-note {
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* Mensaje de estado */
.evox-form-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
}

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

.evox-form-message.success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.evox-form-message.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.evox-form-message .message-icon {
    flex-shrink: 0;
}

.evox-form-message.success .message-icon {
    color: #10b981;
}

.evox-form-message.error .message-icon {
    color: #ef4444;
}

.evox-form-message .message-content strong {
    display: block;
    margin-bottom: 4px;
}

.evox-form-message .message-content p {
    margin: 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 520px) {
    .evox-modal-content {
        padding: 32px 24px;
    }

    .modal-title {
        font-size: 20px;
    }

    .evox-submit-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}
