/* Repayment Calculator Specific Styles */

/* Results Section */
.results-section {
    animation: fadeInUp 0.6s ease-out;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 30px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.result-item.highlight {
    background: linear-gradient(135deg, #204080 0%, #1a3366 100%);
    color: white;
    grid-column: 1 / -1;
}

.result-item.highlight:hover {
    background: linear-gradient(135deg, #1a3366 0%, #142a5c 100%);
}

.result-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(32, 64, 128, 0.1);
    flex-shrink: 0;
}

.result-item.highlight .result-icon {
    background: rgba(255, 255, 255, 0.2);
}

.result-icon i {
    font-size: 20px;
    color: #204080;
}

.result-item.highlight .result-icon i {
    color: white;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.result-item.highlight .result-label {
    color: rgba(255, 255, 255, 0.8);
}

.result-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.result-item.highlight .result-value {
    color: white;
}

/* Quick Actions Section */
.quick-actions {
    margin-top: 30px;
    padding: 30px;
    background: #f8f9ff;
    border-radius: 15px;
    border: 1px solid rgba(32, 64, 128, 0.1);
}

.quick-actions h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-actions h3 i {
    color: #204080;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
    background: #204080;
    border-color: #204080;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(32, 64, 128, 0.2);
}

.action-btn i {
    font-size: 18px;
    color: #204080;
    transition: color 0.3s ease;
}

.action-btn:hover i {
    color: white;
}

.action-btn span {
    font-size: 14px;
    line-height: 1.3;
}

/* Enhanced Results Display */
.result-item {
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #204080, #1a3366);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.result-item:hover::before {
    transform: scaleX(1);
}

.result-item.highlight::before {
    transform: scaleX(1);
    background: rgba(255, 255, 255, 0.3);
}

/* Loading States */
.calculating {
    opacity: 0.6;
    pointer-events: none;
}

.calculating .calculate-btn {
    background: #ccc;
    cursor: not-allowed;
}

.calculating .calculate-btn i {
    animation: spin 1s linear infinite;
}

/* Comparison Features */
.comparison-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

.comparison-note i {
    color: #f39c12;
    margin-right: 8px;
}

/* Progress Indicators */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #204080, #1a3366);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    min-width: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 20px;
    }

    .result-item.highlight {
        grid-column: 1;
    }

    .result-value {
        font-size: 20px;
    }

    .actions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .action-btn {
        padding: 15px 18px;
    }

    .quick-actions {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .result-item {
        padding: 15px;
    }

    .result-icon {
        width: 40px;
        height: 40px;
    }

    .result-icon i {
        font-size: 16px;
    }

    .result-value {
        font-size: 18px;
    }

    .action-btn {
        padding: 12px 15px;
    }

    .action-btn i {
        font-size: 16px;
    }

    .action-btn span {
        font-size: 13px;
    }
}

/* Animation for results */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Print styles */
@media print {
    .quick-actions {
        display: none;
    }

    .action-btn {
        display: none;
    }

    .result-item {
        break-inside: avoid;
    }
}

/* Enhanced visual feedback */
.result-item:hover .result-icon {
    transform: scale(1.1);
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.02);
}

/* Accessibility improvements */
.result-item:focus-within {
    outline: 2px solid #204080;
    outline-offset: 2px;
}

.action-btn:focus {
    outline: 2px solid #204080;
    outline-offset: 2px;
}

/* Success states */
.result-item.success {
    border-left: 4px solid #28a745;
}

.result-item.warning {
    border-left: 4px solid #ffc107;
}

.result-item.info {
    border-left: 4px solid #17a2b8;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Analysis Benefits Section */
.analysis-benefits {
    margin: 60px 0;
    padding: 50px 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.analysis-benefits h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.analysis-benefits h2 i {
    color: #204080;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0 30px;
}

.benefit-card {
    background: #f8f9ff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(32, 64, 128, 0.1);
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(32, 64, 128, 0.15);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: #204080;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.benefit-icon i {
    font-size: 24px;
    color: white;
}

.benefit-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.benefit-card p {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
}

/* Cost Breakdown Section */
.cost-breakdown {
    margin: 60px 0;
    padding: 50px 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border-radius: 20px;
}

.cost-breakdown h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cost-breakdown h2 i {
    color: #204080;
}

.breakdown-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 30px;
}

.breakdown-text h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 25px;
}

.cost-components {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.component-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.component-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #204080, #1a3366);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.component-icon i {
    font-size: 20px;
    color: white;
}

.component-details h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.component-details p {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
}

.breakdown-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cost-chart {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 300px;
}

.cost-chart h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.chart-container {
    display: flex;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chart-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    line-height: 1.2;
}

.chart-segment.principal {
    background: linear-gradient(135deg, #204080, #1a3366);
}

.chart-segment.interest {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.chart-note {
    font-size: 12px;
    color: #666;
    margin: 0;
    font-style: italic;
}

/* Decision Guide Section */
.decision-guide {
    margin: 60px 0;
    padding: 50px 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.decision-guide h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.decision-guide h2 i {
    color: #204080;
}

.decision-steps {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9ff;
    border-radius: 15px;
    border: 1px solid rgba(32, 64, 128, 0.1);
    transition: all 0.3s ease;
}

.step-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(32, 64, 128, 0.15);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #204080, #1a3366);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 20px;
}

.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.step-content p {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
    margin: 0;
}

/* FAQ Section */
.faq-section {
    margin: 60px 0;
    padding: 50px 0;
    background: #f8f9fa;
    border-radius: 20px;
}

.faq-section h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.faq-section h2 i {
    color: #204080;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 30px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.faq-question {
    padding: 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(32, 64, 128, 0.05);
}

.faq-question h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.faq-question i {
    color: #204080;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #f8f9ff;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 25px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    font-size: 15px;
    margin: 0;
}

/* Responsive adjustments for new content */
@media (max-width: 768px) {
    .breakdown-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .chart-container {
        height: 150px;
    }

    .step-item {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .component-item {
        flex-direction: column;
        text-align: center;
    }

    .component-icon {
        margin-bottom: 15px;
    }
}
