/**
 * CSS Frontend - Calculadora Hipotecaria
 */

:root {
    --rh-primary: #DC143C;
    --rh-secondary: #B71C1C;
    --rh-accent: #FF1744;
    --rh-success: #22c55e;
    --rh-light: #f5f5f5;
    --rh-border: #e0e0e0;
    --rh-text: #333;
    --rh-text-secondary: #666;
}

/* Wrapper */
.rh-calc-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 10px;
}

/* Hero Section */
.rh-calc-hero {
    text-align: center;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(20, 71, 99, 0.05) 0%, rgba(45, 132, 119, 0.05) 100%);
    padding: 30px 20px;
    border-radius: 12px;
}

.rh-calc-hero h3 {
    font-size: 32px;
    font-weight: 600;
    color: var(--rh-primary);
    margin-bottom: 10px;
}

.rh-calc-hero p {
    font-size: 16px;
    color: var(--rh-text-secondary);
    margin: 0;
}

/* Container */
.rh-calc-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

/* Form Section */
.rh-calc-form-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--rh-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Form Group */
.rh-calc-form-group {
    margin-bottom: 22px;
}

.rh-calc-form-group:last-child {
    margin-bottom: 0;
}

.rh-calc-form-group label {
    display: block;
    font-weight: 500;
    color: var(--rh-text);
    margin-bottom: 6px;
    font-size: 14px;
}

/* Input */
.rh-calc-input-wrapper,
.rh-calc-input-pago-inicial {
    display: flex;
    align-items: center;
    border: 1px solid var(--rh-border);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.rh-calc-currency {
    padding: 12px 15px;
    color: var(--rh-secondary);
    font-weight: 600;
    background: var(--rh-light);
    border-right: 1px solid var(--rh-border);
}

.rh-calc-input-precio,
.rh-calc-input-pago-inicial-valor {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 16px;
    color: var(--rh-text);
}

.rh-calc-input-precio:focus,
.rh-calc-input-pago-inicial-valor:focus {
    outline: none;
    background: #fafafa;
}

/* Separator */
.rh-calc-separator {
    padding: 0 8px;
    color: var(--rh-border);
}

.rh-calc-pago-inicial-porcentaje {
    padding: 0 15px;
    font-weight: 600;
    color: var(--rh-secondary);
}

/* Select */
.rh-calc-select-banco,
.rh-calc-select-años {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--rh-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--rh-text);
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.rh-calc-select-banco:hover,
.rh-calc-select-años:hover {
    border-color: var(--rh-secondary);
}

.rh-calc-select-banco:focus,
.rh-calc-select-años:focus {
    outline: none;
    border-color: var(--rh-secondary);
    box-shadow: 0 0 0 3px rgba(45, 132, 119, 0.1);
}

/* Slider */
.rh-calc-slider-group {
    margin-bottom: 22px;
}

.rh-calc-slider {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: var(--rh-border);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 0px;
}

.rh-calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--rh-secondary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(45, 132, 119, 0.3);
    border: 3px solid white;
    transition: all 0.2s;
}

.rh-calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(45, 132, 119, 0.4);
}

.rh-calc-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--rh-secondary);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(45, 132, 119, 0.3);
    transition: all 0.2s;
}

.rh-calc-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--rh-text-secondary);
    margin-top: 10px;
}

/* Result Section */
.rh-calc-result-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--rh-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

/* Info Row */
.rh-calc-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--rh-light);
}

.rh-calc-info-item {
    display: flex;
    flex-direction: column;
}

.rh-calc-info-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--rh-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.rh-calc-info-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--rh-secondary);
}

/* Progress Bar */
.rh-calc-progress-container {
    margin-bottom: 30px;
}

.rh-calc-progress-bar {
    display: flex;
    height: 30px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--rh-light);
}

.rh-calc-progress-inicial {
    background: linear-gradient(90deg, var(--rh-primary), var(--rh-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
    transition: width 0.3s ease;
    min-width: 40px;
}

.rh-calc-progress-financiar {
    background: var(--rh-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rh-text-secondary);
    font-size: 11px;
    font-weight: 600;
    transition: width 0.3s ease;
}

.rh-calc-progress-label {
    font-size: 10px;
    white-space: nowrap;
}

/* Cuota Section */
.rh-calc-cuota-section {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rh-calc-cuota-label {
    font-size: 14px;
    color: var(--rh-text-secondary);
    margin-bottom: 10px;
    margin: 0 0 10px 0;
}

.rh-calc-cuota-valor {
    font-size: 48px;
    font-weight: 700;
    color: var(--rh-success);
    margin: 0 0 20px 0;
}

.rh-calc-cuota-nota {
    font-size: 12px;
    color: var(--rh-text-secondary);
    font-style: italic;
    margin: 0;
}

/* Disclaimer */
.rh-calc-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.rh-calc-disclaimer p {
    margin: 0;
    font-size: 13px;
    color: #856404;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .rh-calc-hero {
        padding: 30px 15px;
    }
    
    .rh-calc-hero h3 {
        font-size: 24px;
    }
    
    .rh-calc-container {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .rh-calc-form-section,
    .rh-calc-result-section {
        padding: 20px;
    }
    
    .rh-calc-info-row {
        grid-template-columns: 1fr;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .rh-calc-cuota-valor {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .rh-calc-hero h3 {
        font-size: 22px;
        margin-bottom: 6px;
    }
    
    .rh-calc-hero p {
        font-size: 13px;
    }
    
    .rh-calc-form-group {
        margin-bottom: 14px;
    }
    
    .rh-calc-form-group label {
        font-size: 12px;
    }
    
    .rh-calc-input-precio,
    .rh-calc-select-banco,
    .rh-calc-select-años,
    .rh-calc-input-pago-inicial-valor {
        font-size: 14px;
        padding: 9px;
    }
    
    .rh-calc-currency {
        font-size: 13px;
    }
    
    .rh-calc-cuota-valor {
        font-size: 28px;
    }
    
    .rh-calc-cuota-nota {
        font-size: 11px;
    }
    
    .rh-calc-info-value {
        font-size: 15px;
    }
}
