/* ===========================
   CASHPEDIA CALCULATOR STYLES
   Include this file in your calculator pages
=========================== */

/* CSS Variables - CashPedia Theme */
:root {
    /* Primary Colors */
    --navy-deep: #030f27;
    --navy-medium: #030f27;
    --navy-light: #34495E;
    
    /* Neutral Colors */
    --cream: #FAF7F2;
    --cream-dark: #F0EBE3;
    --beige: #E8DFD0;
    
    /* Accent */
    --copper: #fdbe33;
    --copper-light: #CD853F;
    --copper-dark: #9B5E2A;
    
    /* Status */
    --green: #2E7D32;
    --amber: #E65100;
    --gray: #6C757D;
    
    /* Text */
    --text-primary: #1B2A41;
    --text-secondary: #5A6C7D;
    --text-muted: #8A96A3;
    
    /* Borders */
    --border-light: #DDD5C7;
    --border-medium: #C5B8A5;
    
    /* Typography */
    --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Source Code Pro', 'Courier New', monospace;
}

/* ===========================
   CALCULATOR LANDING PAGE
=========================== */

.calculator-hero {
    background: linear-gradient(135deg, #030f27 0%, #34495E 100%);
    color: #FAF7F2;
    padding: 3rem 0;
    border-bottom: 3px solid #fdbe33;
}

.calculator-hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.calculator-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    color: #FAF7F2;
}

.calculator-hero p {
    font-size: 1.25rem;
    color: #fdbe33;
    font-weight: 600;
    max-width: 800px;
    margin: 0 auto;
}

.calculator-section {
    background: white;
    padding: 3rem 0;
}

.calc-page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
}

.calc-box {
    background: white;
    border: 2px solid #DDD5C7;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #1B2A41;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.calc-box:hover {
    border-color: #fdbe33;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(253, 190, 51, 0.2);
    text-decoration: none;
}

.calc-box i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fdbe33;
    transition: all 0.3s ease;
}

.calc-box:hover i {
    transform: scale(1.1);
}

.calc-box h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #1B2A41;
    transition: color 0.3s ease;
}

.calc-box:hover h3 {
    color: #fdbe33;
}

/* ===========================
   CALCULATOR ENGINE
=========================== */

.calculators-header {
    background: linear-gradient(135deg, #030f27 0%, #34495E 100%);
    color: #FAF7F2;
    padding: 2.5rem 0;
    text-align: center;
    border-bottom: 3px solid #fdbe33;
}

.calculators-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    color: #FAF7F2;
}

.calculators-header p {
    font-size: 1rem;
    color: #fdbe33;
    font-weight: 600;
    opacity: 0.95;
}

.calc-main {
    flex: 3;
    min-width: 300px;
}

.calc-sidebar {
    flex: 1;
    min-width: 250px;
    background: #FAF7F2;
    padding: 1.5rem;
    border-radius: 12px;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 2px solid #DDD5C7;
}

.calc-interface {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    background: white;
    border: 2px solid #DDD5C7;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.calc-inputs {
    flex: 1;
    min-width: 280px;
    border-right: 2px solid #DDD5C7;
    padding-right: 2rem;
}

.calc-visuals {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 1rem;
}

.calc-inputs label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1B2A41;
    font-size: 0.9375rem;
}

.calc-inputs label span {
    float: right;
    font-weight: 600;
    color: #fdbe33;
    font-size: 1rem;
    background: rgba(253, 190, 51, 0.1);
    padding: 2px 10px;
    border-radius: 4px;
    font-family: 'Source Code Pro', monospace;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.slider-input {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.calc-inputs input[type="number"], 
.calc-inputs select, 
.calc-inputs input[type="date"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #C5B8A5;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background: white;
}

.calc-inputs input[type="number"]:focus, 
.calc-inputs select:focus,
.calc-inputs input[type="date"]:focus {
    border-color: #fdbe33;
    outline: none;
    box-shadow: 0 0 0 3px rgba(253, 190, 51, 0.1);
}

.calc-inputs input[type="number"].manual-entry {
    width: 100px;
    text-align: right;
    font-weight: bold;
    color: #1B2A41;
    font-family: 'Source Code Pro', monospace;
}

.calc-inputs input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #DDD5C7;
    border-radius: 5px;
    outline: none;
    padding: 0;
    margin: 0;
    background-image: linear-gradient(#fdbe33, #fdbe33);
    background-size: 0% 100%;
    background-repeat: no-repeat;
}

.calc-inputs input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 3px solid #fdbe33;
    box-shadow: 0 2px 6px rgba(253, 190, 51, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.calc-inputs input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #fdbe33;
    border-color: white;
}

.calc-inputs input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: white;
    border: 3px solid #fdbe33;
    box-shadow: 0 2px 6px rgba(253, 190, 51, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.calc-inputs input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
    background: #fdbe33;
    border-color: white;
}

.calc-inputs input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: transparent; 
    border-radius: 5px;
}

.calc-btn {
    background: linear-gradient(135deg, #fdbe33 0%, #9B5E2A 100%);
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    font-weight: 700;
    margin-top: 1rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(253, 190, 51, 0.3);
}

.calc-btn:hover { 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 190, 51, 0.4);
}

.result-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #fdbe33;
    box-shadow: 0 2px 8px rgba(253, 190, 51, 0.1);
}

.result-box p {
    display: flex;
    justify-content: space-between;
    margin: 0.75rem 0;
    font-size: 1.0625rem;
    color: #1B2A41;
    border-bottom: 1px dashed #DDD5C7;
    padding-bottom: 0.5rem;
}

.result-box p:last-child { 
    border-bottom: none; 
}

.result-box strong { 
    font-weight: 700; 
    color: #1B2A41;
}

.result-box span {
    font-family: 'Source Code Pro', monospace;
    font-weight: 600;
    color: #fdbe33;
}

.chart-wrapper {
    position: relative;
    height: 320px;
    width: 100%;
}

.desc-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-top: 0;
    border: 2px solid #DDD5C7;
}

.desc-card h2 { 
    color: #030f27; 
    font-size: 1.5rem; 
    margin-bottom: 1rem; 
    border-bottom: 2px solid #fdbe33;
    padding-bottom: 0.75rem;
    font-weight: 800;
}

.desc-card h3 { 
    color: #1B2A41;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.desc-card p { 
    line-height: 1.7; 
    color: #5A6C7D;
    margin-bottom: 1rem;
}

.formula-box {
    background: #030f27;
    color: #FAF7F2;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Source Code Pro', monospace;
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.9375rem;
    border: 2px solid #fdbe33;
}

.desc-card ul { 
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.desc-card li { 
    margin-bottom: 0.5rem;
    color: #5A6C7D;
    line-height: 1.6;
}

.sidebar-links h3 { 
    border-bottom: 2px solid #fdbe33;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    color: #030f27;
    font-weight: 700;
}

.sidebar-links ul { 
    list-style: none;
    padding: 0;
}

.sidebar-links li { 
    margin-bottom: 0.75rem;
}

.sidebar-links a { 
    text-decoration: none;
    color: #5A6C7D;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    padding: 0.625rem;
    border-radius: 6px;
}

.sidebar-links a:hover { 
    color: #fdbe33;
    background: rgba(253, 190, 51, 0.1);
}

.sidebar-links i { 
    margin-right: 0.75rem;
    width: 25px;
    text-align: center;
    color: #fdbe33;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 1200px) {
    .calculator-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .calculator-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .calculator-hero h1 {
        font-size: 2rem;
    }
    
    .calculator-hero p {
        font-size: 1.125rem;
    }
}

@media (max-width: 900px) {
    .calc-interface {
        flex-direction: column-reverse;
    }
    .calc-inputs {
        border-right: none;
        padding-right: 0;
        border-top: 2px solid #DDD5C7;
        padding-top: 2rem;
    }
    .calc-visuals {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .calculator-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .calc-box {
        padding: 1.5rem 1rem;
        min-height: 140px;
    }
    
    .calc-box i {
        font-size: 2rem;
    }
    
    .calc-box h3 {
        font-size: 0.9rem;
    }
    
    .calculator-hero {
        padding: 2rem 0;
    }
    
    .calculator-hero h1 {
        font-size: 1.75rem;
    }
    
    .calculator-hero p {
        font-size: 1rem;
    }
    
    .calc-page-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .calc-interface {
        padding: 1.5rem;
    }
    
    .calculators-header h1 {
        font-size: 1.5rem;
    }
    
    .desc-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
    
    .calc-box {
        padding: 1.25rem;
    }
}