/* Modern Minimal Calculator UI */

.tool-container {
    padding-top: 100px;
    padding-bottom: 80px;
}

.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.tool-header {
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tool-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
    align-items: start;
}

/* Inputs */
.calculator-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(84, 105, 212, 0.1);
}

.help-text {
    color: var(--text-muted);
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* Results */
.result-sidebar {
    position: sticky;
    top: 100px;
    display: grid;
    gap: 2rem;
}

.result-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}

.result-card.highlight {
    background: #f0f4ff;
    border-color: #c0ccff;
}

.result-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.result-breakdown {
    text-align: left;
    display: grid;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
}

.breakdown-row .label { color: var(--text-muted); }
.breakdown-row .value { font-weight: 600; color: var(--secondary); }

/* FAQ Section */
.faq-section {
    margin-top: 4rem;
}

.faq-item {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.faq-item h4 {
    margin-bottom: 0.5rem;
}

@media (max-width: 992px) {
    .tool-layout {
        grid-template-columns: 1fr;
    }
    .result-sidebar {
        position: static;
    }
}

/* Chart Integration */
.chart-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

#result-chart {
    width: 100% !important;
    height: 100% !important;
}

/* Premium Sliders */
.slider-group {
    margin-top: 1rem;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #eef1f6;
    border-radius: 5px;
    outline: none;
    margin: 1.5rem 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.1s ease;
}

input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* Amortization Table */
.data-table-container {
    margin-top: 4rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    padding: 1.5rem 2rem;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

table.calcuto-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

table.calcuto-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    border-bottom: 2px solid var(--border-color);
}

table.calcuto-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

table.calcuto-table tr:nth-child(even) {
    background: #fdfdfe;
}

table.calcuto-table tr:hover {
    background: #f1f5f9;
}

@media (max-width: 600px) {
    table.calcuto-table {
        font-size: 0.8rem;
    }
    table.calcuto-table th, 
    table.calcuto-table td {
        padding: 0.75rem 1rem;
    }
}
