/* ============================================
   COTIZADOR NOVA SALUD - ESTILOS AISLADOS
   ============================================ */

/* Contenedor principal con margen para header/footer */
.cotizador-wrapper {
    max-width: 1200px;
    margin: 100px auto 120px auto;
    padding: 20px;
    background-color: #fff;
    /* FIX: Aseguramos que todo el contenido del formulario esté alineado a la izquierda */
    text-align: left !important;
}

/* Grid system exclusivo del cotizador */
.cotizador-wrapper .container-cot {
    width: 100% !important;
    padding: 0 15px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.cotizador-wrapper .row-cot {
    display: flex !important;
    flex-wrap: wrap !important;
    margin: 0 -15px !important;
}

.cotizador-wrapper .col-cot {
    width: 100% !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

/* Columnas responsive - Bootstrap 5 style */
.cotizador-wrapper .row-cot > * {
    /* Mantenemos el padding original si era necesario, o forzamos 0 si fue lo que funcionó mejor */
    padding: 0 15px;
}

.cotizador-wrapper .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.cotizador-wrapper .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.cotizador-wrapper .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.cotizador-wrapper .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.cotizador-wrapper .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Gutters */
.cotizador-wrapper .g-3 {
    margin: 0 -0.75rem;
}

.cotizador-wrapper .g-3 > * {
    padding: 0 0.75rem;
    /* Mantenemos este margen que evita la superposición de filas */
    margin-bottom: 1rem !important; 
}

/* Form controls */
.cotizador-wrapper .form-control,
.cotizador-wrapper .form-select {
    display: block;
    width: 100%; 
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    /* FIX: Aseguramos la alineación del texto dentro de los inputs */
    text-align: left !important;
    
    /* Mantenemos el margen superior para la separación clara con el label */
    margin-top: 25px !important; 
}

.cotizador-wrapper .form-control:focus,
.cotizador-wrapper .form-select:focus {
    color: #212529;
    background-color: #fff;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.cotizador-wrapper .form-label {
    display: inline-block !important; 
    line-height: 1.5 !important;
    font-weight: 500;
    /* FIX: Aseguramos la alineación de los labels */
    text-align: left !important;
    
    position: relative !important; 
    
    /* AJUSTE CLAVE: Margen negativo para subir la etiqueta dentro de la celda de la grilla */
    margin-top: -15px !important; 
    
    /* Revertimos el margin-bottom para que el margen superior del input funcione */
    margin-bottom: 0px !important; 
}

/* Las demás reglas (radio/checkbox, botones, etc.) se mantienen igual para la alineación general */

/* Form checks (radio/checkbox) */
.cotizador-wrapper .form-check:first-of-type {
    margin-top: 20px !important; /* Mueve la primera opción hacia abajo */
}
.cotizador-wrapper .form-check {
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.5rem;
    /* FIX: Aseguramos que el bloque de radio/checkbox se alinee a la izquierda */
    text-align: left !important;
}

.cotizador-wrapper .form-check-input {
    width: 1em;
    height: 1em;
    margin-top: 0.25em;
    margin-left: -1.5em;
    vertical-align: top;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid rgba(0, 0, 0, 0.25);
    appearance: none;
    print-color-adjust: exact;
}

.cotizador-wrapper .form-check-input[type="checkbox"] {
    border-radius: 0.25em;
}

.cotizador-wrapper .form-check-input[type="radio"] {
    border-radius: 50%;
}

.cotizador-wrapper .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.cotizador-wrapper .form-check-input:checked[type="checkbox"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3csvg%3e");
}

.cotizador-wrapper .form-check-input:checked[type="radio"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
}

.cotizador-wrapper .form-check-label {
    cursor: pointer;
}

/* Buttons */
.cotizador-wrapper .btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.cotizador-wrapper .btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.cotizador-wrapper .btn-primary:hover {
    color: #fff;
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.cotizador-wrapper .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.3rem;
}

.cotizador-wrapper .btn-success {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}

.cotizador-wrapper .btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

/* Títulos y texto */
/* Solo centramos títulos H2 y H4 del cotizador */
.cotizador-wrapper h2 {
    font-size: 2rem;
    font-weight: 600;
}

.cotizador-wrapper h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

.cotizador-wrapper h5 {
    font-size: 1.25rem;
    font-weight: 600;
}

.cotizador-wrapper h6 {
    font-size: 1rem;
    font-weight: 600;
}

/* La clase text-center se mantiene para centrar solo donde se usa */
.cotizador-wrapper .text-center {
    text-align: center !important;
}

.cotizador-wrapper .mb-4 {
    margin-bottom: 1.5rem !important;
}

.cotizador-wrapper .mt-3 {
    margin-top: 1rem !important;
}

.cotizador-wrapper .mt-4 {
    margin-top: 1.5rem !important;
}

/* Plan Cards */
.cotizador-wrapper .plan-card {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background-color: #fff;
    /* Fuerza alineación izquierda para contenido de la tarjeta */
    text-align: left !important;
}

.cotizador-wrapper .plan-valido {
    border-color: #28a745;
    background-color: #f8fff9;
}

.cotizador-wrapper .plan-invalido {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.cotizador-wrapper .precio {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    /* Centramos el precio para el display */
    text-align: center;
    margin: 15px 0;
}

.cotizador-wrapper .estado-valido {
    color: #28a745;
    font-weight: bold;
    /* Centramos el mensaje de estado */
    text-align: center;
}

.cotizador-wrapper .estado-invalido {
    color: #dc3545;
    font-weight: bold;
    /* Centramos el mensaje de estado */
    text-align: center;
}

.cotizador-wrapper .whatsapp-btn {
    background-color: #25d366 !important;
    border-color: #25d366 !important;
    color: #fff !important;
}

.cotizador-wrapper .whatsapp-btn:hover {
    background-color: #128c7e !important;
    border-color: #128c7e !important;
}

.cotizador-wrapper .detalle-aporte {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.cotizador-wrapper .caracteristicas ul {
    margin-bottom: 10px;
    padding-left: 0;
}

.cotizador-wrapper .caracteristicas li {
    margin-bottom: 5px;
    list-style: none;
}

.cotizador-wrapper .list-unstyled {
    padding-left: 0;
    list-style: none;
}

.cotizador-wrapper .descripcion {
    margin-top: 10px;
    margin-bottom: 10px;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .cotizador-wrapper {
        margin: 80px 10px 100px 10px;
        padding: 10px;
    }
    
    .cotizador-wrapper .col-md-3,
    .cotizador-wrapper .col-md-4,
    .cotizador-wrapper .col-md-6,
    .cotizador-wrapper .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .cotizador-wrapper h2 {
        font-size: 1.5rem;
    }
    
    .cotizador-wrapper .precio {
        font-size: 20px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .cotizador-wrapper .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}