/* Estilos mejorados para la calculadora de hipotecas */

.simulador-hipoteca.container {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #333;
}

.simulador-hipoteca h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

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

.simulador-hipoteca .form-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.simulador-hipoteca .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #ffffff;
    color: #333;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.simulador-hipoteca .form-control:focus {
    border-color: #3498db;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.simulador-hipoteca .form-control[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Range Input Styles */
.simulador-hipoteca input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
    cursor: pointer;
}

.simulador-hipoteca input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.simulador-hipoteca input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.simulador-hipoteca input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Interest Rate Display */
.simulador-hipoteca #porcentajeInteresValor {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}

/* Results Section */
.simulador-hipoteca .w-100 {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.simulador-hipoteca .w-100 h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.simulador-hipoteca .w-100 p {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 0;
    text-align: center;
}

.simulador-hipoteca .w-100 span {
    color: #3498db;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Error Messages */
.simulador-hipoteca .text-danger {
    color: #ff6b6b !important;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    text-shadow: none;
}

/* Slides valores */
.simulador-hipoteca .slides-valores {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.simulador-hipoteca .slides-valores label {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .simulador-hipoteca.container {
        padding: 20px;
        margin: 15px 0;
    }
    
    .simulador-hipoteca h4 {
        font-size: 1.3rem;
    }
    
    .simulador-hipoteca .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .simulador-hipoteca .w-100 {
        padding: 15px;
    }
    
    .simulador-hipoteca .w-100 h3 {
        font-size: 1.1rem;
    }
}

/* Animation for results */
.simulador-hipoteca .w-100 {
    animation: slideInUp 0.5s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects */
.simulador-hipoteca.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

/* Loading state */
.simulador-hipoteca.loading {
    opacity: 0.7;
    pointer-events: none;
}

.simulador-hipoteca.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 3;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}