/* Calcular Hipotecas Pro - Estilos */

.mortgage-calculator-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.mortgage-calc-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.mortgage-calc-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 28px;
}

.mortgage-calc-header p {
    color: #7f8c8d;
    margin: 0;
}

.mortgage-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group small {
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

.review-period-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-calculate {
    padding: 15px 30px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-calculate:hover {
    background: #2980b9;
}

.btn-calculate:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.mortgage-results {
    margin-top: 40px;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.results-header h3 {
    margin: 0;
    color: #2c3e50;
}

.btn-export {
    padding: 10px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-export:hover {
    background: #c0392b;
}

.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    color: white;
}

.summary-card.green {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

.summary-card.blue {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
}

.summary-card.orange {
    background: linear-gradient(135deg, #f46b45 0%, #eea849 100%);
}

.summary-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: normal;
}

.summary-card .value {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.results-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #3498db;
}

.tab-btn.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.tab-content {
    display: none;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

.period-details {
    display: grid;
    gap: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.detail-label {
    font-weight: 600;
    color: #2c3e50;
}

.detail-value {
    font-weight: bold;
    color: #3498db;
    font-size: 18px;
}

.table-wrapper {
    overflow-x: auto;
}

.amortization-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
}

.amortization-table th {
    background: #3498db;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.amortization-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.amortization-table tr:nth-child(even) {
    background: #f8f9fa;
}

.amortization-table tr:hover {
    background: #e3f2fd;
}

#mortgage-chart {
    max-height: 400px;
}

@media (max-width: 768px) {
    .mortgage-calculator-container {
        padding: 20px;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .results-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
}