@charset "utf-8";
/* CSS Document */

/* ---------- Estilos del Modal ---------- */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Estado activo */
.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.35s ease;
}

/* Animación de aparición */
.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* ---------- Encabezado del modal ---------- */

.modal-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.modal-header h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.modal-header p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0;
}

/* ---------- Campos del formulario ---------- */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group select:focus-visible,
.form-group input:focus-visible {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
    outline: none;
}

/* ---------- Botones ---------- */

.btn-container {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: flex-end;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #4CAF50;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.25);
}

.btn-primary:hover {
    background: #45a049;
}

.btn-secondary {
    background: #f1f1f1;
    color: #333;
    font-weight: 500;
}

.btn-secondary:hover {
    background: #e1e1e1;
}

/* ---------- Botón para abrir el modal ---------- */

.BTNCTAS {
    width: 100%;
    display: flex;
    justify-content: center;
}

.open-modal-btn {
    background: #4CAF50;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin: auto;
    font-weight: 600;
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.open-modal-btn:hover {
    background: #45a049;
}

.open-modal-btn:active {
    transform: scale(0.98);
}

.precio-display {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    background: #f8f9fa;
    border-left: 4px solid #4CAF50;
}

.precio-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.precio-final {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
}

.precio-error {
    color: #dc3545;
    font-style: italic;
}

/* Mejoras para el modal */
.modal-content {
    max-height: 85vh;
    overflow-y: auto;
}

.form-group {
    position: relative;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .precio-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .precio-final {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
        width: 92%;
        border-radius: 10px;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .btn {
        font-size: 15px;
        padding: 10px;
    }
}