/* Mortgage Repayment Calculator Visual Styling - Matches mortgage-borrowing-calc.css basis */

:root {
    --primary-color: #091030;
    --accent-color: #ecc362;
    --light-bg: #f8f9fa;
    --white: #fff;
    --border-color: #dee2e6;
    --text-dark: #333;
    --grey: #dadbde;
}

body {
    font-family: "Inter", "Raleway", "Roboto", Arial, sans-serif;
    background: var(--grey);
}

/* Custom styles for Mortgage Calculator */

/* Hero Section */
.hero-section {
    background-color: #091030;
    color: #ffffff;
    padding: 4rem 0;
    margin-bottom: 0;
}

.hero-section .display-4 {
    color: #ffffff;
    font-weight: 700;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(9, 16, 48, 0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #ecc362;
    border-radius: 12px 12px 0 0 !important;
    padding: 1.5rem;
}

.card-title {
    color: #091030;
    font-weight: 600;
    font-size: 1.25rem;
}

.card-body {
    padding: 2rem;
}

/* Form Styling - Fixed for interaction */
.form-label {
    color: #091030;
    font-weight: 500;
    margin-bottom: 0.75rem;
    pointer-events: none; /* Labels should not interfere */
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #091030;
    pointer-events: auto; /* Ensure inputs are interactive */
    user-select: text; /* Allow text selection */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.form-control:focus {
    border-color: #ecc362;
    box-shadow: 0 0 0 0.2rem rgba(236, 195, 98, 0.25);
    outline: none;
}

.form-control:hover {
    border-color: #dee2e6;
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

.input-group-text {
    /*background: var( background: var(--grid-color);*/
    background-color: var(--grid-color);
    color: #ffffff;
    border: 2px solid #091030;
    font-weight: 500;
    pointer-events: none; /* Prevent interference with input */
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Input validation styles */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Table Styling */
.table-header th {
    background: var(--grid-color);
    color: #ffffff;
    border: none;
    padding: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-row td {
    padding: 1.5rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
}

.table-row:hover {
    background-color: rgba(236, 195, 98, 0.1);
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

/* Text Colors */
.text-primary {
    color: #091030 !important;
}

.text-accent {
    color: #ecc362 !important;
}

/* Summary Section */
.summary-section {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.summary-section h5 {
    color: #091030;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.summary-item {
    text-align: center;
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 16, 48, 0.1);
}

.summary-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.summary-value {
    color: #091030;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Footer */
.footer-section {
    background-color: #091030;
    color: #ffffff;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
}

/* Result value animation */
.result-value {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .summary-section {
        padding: 1.5rem;
    }
    
    .table-row td {
        padding: 1rem 0.75rem;
    }
    
    .fs-4 {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .summary-section {
        padding: 1rem;
    }
    
    .summary-item {
        margin-bottom: 1rem;
    }
}

/* Ensure all interactive elements work properly */
input, button, select, textarea {
    pointer-events: auto !important;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ecc362;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4a852;
}

/* Print styles */
@media print {
    .hero-section,
    .footer-section {
        background-color: transparent !important;
        color: #000 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}