/* Estilos del Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.activo {
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-contenido {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-pequeno {
    max-width: 400px;
}

.modal-imagen {
    max-width: 600px;
}

.modal-grande {
    max-width: 80vw;
    width: 80%;
    max-height: 80vh;
    padding: 20px;
}

.cerrar {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.cerrar:hover {
    color: #333;
}

.modal-contenido h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal-contenido p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.6;
}

/* Estilos del Formulario */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Botones del Modal */
.modal-botones {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Imagen Placeholder */
.imagen-placeholder {
    margin: 20px 0;
    text-align: center;
}

.imagen-placeholder svg {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Iframe Container */
.iframe-container {
    width: 100%;
    height: 60vh;
    margin: 20px 0;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal Resultado */
.modal-resultado {
    text-align: center;
}

.modal-resultado h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.modal-resultado.exito h2 {
    color: #10b981;
}

.modal-resultado.cancelado h2 {
    color: #6b7280;
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }
    
    .modal-contenido {
        padding: 20px;
    }
    
    .modal-grande {
        width: 95%;
        max-width: 95vw;
        padding: 15px;
    }
    
    .iframe-container {
        height: 50vh;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}


/* Loading */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    backdrop-filter: blur(4px);
}

.loading.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #3b82f6;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: white;
    font-size: 16px;
}