/* --- CALCS.CSS --- */
/* Designed for Teacher Financial Vibes - Calculator Module */

/* ========================================= */
/* 1. HEADER OVERRIDES (Force Scrolled Look) */
/* ========================================= */
body.calculator-page .site-header,
.site-header { 
    padding: 6px 0 !important;
    background-color: rgba(0, 0, 0, 0.9) !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15) !important;
    position: sticky !important;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.site-header .main-nav a {
    font-size: 14px !important;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.site-header .site-logo img {
    transform: scale(0.75) !important;
    transform-origin: left center;
}

/* ========================================= */
/* 2. LAYOUT & BACKGROUNDS                   */
/* ========================================= */
.calc-layout-wrapper {
    background-color: #F8F9FC;
    min-height: 100vh;
    padding-top: 40px;
    padding-bottom: 80px;
}

.calcs-hero-section {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); 
    min-height: 400px;
    margin-top: 0;
    padding-top: 60px;
    padding-bottom: 100px;
    margin-bottom: -160px;
}

.calcs-overlay { display: none; }

.calcs-title {
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}

.calcs-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* ========================================= */
/* 3. SIDEBAR NAVIGATION                     */
/* ========================================= */
.calc-sidebar {

    top: 90px;
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0,0,0,0.03);
}

.calc-sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #94A3B8;
    font-weight: 700;
    margin-bottom: 12px;
    padding-left: 12px;
    margin-top: 20px;
}
.calc-sidebar-title:first-child { margin-top: 0; }

.calc-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--secondary-color);
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
}

.calc-nav-item i {
    margin-right: 12px;
    font-size: 1.25rem;
    color: #CBD5E1;
    transition: color 0.2s ease;
}

.calc-nav-item:hover {
    background-color: #F1F5F9;
    color: var(--dark-text);
    transform: translateX(3px);
}

.calc-nav-item:hover i { color: var(--heading-color); }

.calc-nav-item.active {
    background-color: var(--heading-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(10, 94, 69, 0.25);
}

.calc-nav-item.active i { color: rgba(255,255,255,0.9); }

/* ========================================= */
/* 4. CARDS & WIDGETS                        */
/* ========================================= */
.calc-hero-card {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06); 
    margin-bottom: 30px;
    border: 1px solid rgba(0,0,0,0.02);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.calc-hero-header {
    border-bottom: 1px solid #e7eaec;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

.calc-hero-header h1 {
    font-size: 1.75rem;
    color: var(--dark-text);
    font-weight: 700;
}

.calc-hero-header p {
    color: #64748B;
    font-size: 1rem;
}

.dashboard-card {
    background: rgb(245, 255, 250);
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: 0 4px 6px rgba(0,0,0,0.09);
    height: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
}

.dashboard-header { padding: 24px 24px 0 24px; }
.dashboard-body { padding: 24px; }
.custom-icons {
    color: var(--yellow);
}

.quick-action-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #F8FAFC;
    transition: background-color 0.2s ease;
    border-radius: 8px;
}

.quick-action-item:hover { background-color: #f4fcec; }
.quick-action-item:last-child { border-bottom: none; }

.quick-action-icon {
    width: 42px;
    height: 42px;
    background: rgba(110, 193, 228, 0.12);
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 16px;
}

.quick-action-content h6 {
    margin-bottom: 3px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-text);
}

.quick-action-content p { font-size: 0.8rem; color: #64748B; }

.tips-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

.tips-list i {
    color: var(--yellow);
    margin-right: 12px;
    margin-top: 4px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.calc-card {
    background: var(--beige);
    border-radius: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ========================================= */
/* 5. FORM ELEMENTS (Enhanced Elegance)      */
/* ========================================= */

/* Container for each input row */
.form-group-row {
    padding: 24px 0;
    border-bottom: 1px solid #ecedee;
}
.form-group-row:last-child { border-bottom: none; }

/* Labels & Helper Text */
.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155; /* Slate-700 */
    margin-bottom: 4px;
    display: block;
}

.form-helper-text {
    font-size: 0.85rem;
    color: #94A3B8; /* Slate-400 */
    line-height: 1.4;
    margin-bottom: 0;
}

/* Inputs */
.form-control, .form-select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: #1E293B;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    /* Ensure right-aligned inputs for currency/numbers look good */
    text-align: right; 
}

/* Specific styling for currency inputs */
.input-group-currency {
    position: relative;
}

.input-group-currency .currency-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-weight: 500;
    z-index: 5;
    pointer-events: none;
}

.input-group-currency .form-control {
    padding-left: 30px; /* Space for symbol */
}

/* Select Inputs */
.form-select {
    text-align: left; /* Selects usually read better left-aligned */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
}

/* Focus States */
.form-control:focus, .form-select:focus {
    color: #1E293B;
    background-color: #fff;
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(110, 193, 228, 0.2); /* Soft primary glow */
}

/* Hover States */
.form-control:hover, .form-select:hover {
    border-color: #CBD5E1;
}

/* Submit Button Area */
.form-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F1F5F9;
}

.btn-calc-submit {
    background: linear-gradient(135deg, var(--alt-primary-color)  0%, var(--yellow) 100%);
    border: none;
    color: var(--dark-text);
    font-weight: 700;
    padding: 10px 30px;
    border-radius: 8px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(10, 94, 69, 0.25);
    transition: all 0.3s ease;
    width: auto;
}

.btn-calc-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 94, 69, 0.35);
    background: linear-gradient(135deg, #0b694d 0%, #063f2e 100%);
}

.btn-calc-submit:active {
    transform: translateY(0);
}

.btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    border: 1px solid #0f172a;
    background: #0f172a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0 !important;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: transparent;
    color: #0f172a;
    text-decoration: none;
}

/* Ghost version for the non-featured card */
.btn-primary.solid {
    background: transparent;
    color: #0f172a;
}

.btn-primary.solid:hover {
    background: #0f172a;
    color: #fff;
}
/*  ==========OPTIONAL SECTION================*/

.optional-overrides-section {
    background-color: #f8f9fa;
    border-left: 4px solid #dee2e6;
}

.optional-overrides-section h6 {
    font-weight: 600;
    letter-spacing: 0.02em;
}



/* ========================================= */
/* 6. RESULT BOX & ANIMATIONS                */
/* ========================================= */
.result-box {
    margin-top: 40px;
    background: #fdfdf4;
    border: 1px solid #E2E8F0;
    box-shadow: 0 15px 30px rgba(0,0,0,0.09);
    border-left: 5px solid var(--yellow);
    padding: 32px;
    border-radius: 0;
    animation: fadeInUp 0.5s ease-out;
}

.result-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F1F5F9;
}

/* Result Data Grid */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.result-item dt {
    font-size: 0.85rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.result-item dd {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
}

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

.hover-shadow:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
    border-color: var(--primary-color) !important;
    background-color: #fff !important;
}
.transition { transition: all 0.3s ease; }

/* --- CALCULATOR LIST STRIP STYLING --- */

.btn-xs {
    padding: 2px 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 0;
}

.calc-strip-icon-wrapper {
    width: 40px;
    height: 40px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.tool-item {
    transition: background-color 0.2s ease, transform 0.1s ease;
    border-left: 3px solid transparent;
}

.tool-item:hover {
    background-color: #f1f5f9 !important;
    border-left: 3px solid var(--heading-color);
}

.tool-item h6 {
    letter-spacing: -0.2px;
}

/* Locked State Icon */
.calc-strip-icon-wrapper.locked {
    background-color: #f1f5f9;
    opacity: 0.6;
}

.calc-strip-icon-wrapper.locked i {
    color: #94a3b8 !important;
}

/* Search Input Customization */
#toolSearch {
    font-size: 0.85rem;
    border-radius: 0;
}

/* Ensure smooth list-group transitions */
.list-group-flush > .list-group-item {
    border-color: #f1f5f9;
}

/* --- Modular Table Styling --- */
.dash-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.dash-table th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px;
    border-bottom: 2px solid #000;
    text-align: left;
}

.dash-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.85rem;
    color: #1e293b;
}

.dash-table tr:hover {
    background-color: #fcfdfd;
}

/* Horizontal scroll fix for mobile tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

