/**
 * ConvMaster - Mortgage Calculator Styles
 * 
 * @package    ConvMaster
 * @version    1.0.0
 */

/* =====================================================
   TOOL PAGE LAYOUT
   ===================================================== */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tool-header__icon {
    font-size: 2.5rem;
}

.tool-header__icon .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
}

.tool-header__icon .icon--green {
    background: rgba(16, 185, 129, 0.15);
}

.tool-header__text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.tool-header__text p {
    margin: 0;
    color: var(--text-secondary);
}

/* =====================================================
   CURRENT DATE BANNER
   ===================================================== */
.current-date-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.current-date-banner__icon {
    font-size: 1.25rem;
}

.current-date-banner__text {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* =====================================================
   MORTGAGE WIDGET
   ===================================================== */
.mortgage-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* =====================================================
   TOOLBAR
   ===================================================== */
.mortgage-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    flex-wrap: wrap;
    gap: 1rem;
}

.mortgage-toolbar__left,
.mortgage-toolbar__right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Design Selector */
.design-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.design-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.design-buttons {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 0.25rem;
}

.design-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.design-btn:hover {
    background: var(--bg-tertiary);
}

.design-btn.active {
    background: var(--bg-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Popup Button */
.btn-popup {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-popup:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

.btn-popup__icon {
    font-size: 1rem;
}

/* =====================================================
   CALCULATOR CONTAINER
   ===================================================== */
.mortgage-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
    min-height: 580px;
}

/* =====================================================
   CALCULATOR
   ===================================================== */
.mortgage-calculator {
    padding: 1.5rem;
    border-right: 1px solid var(--border-color);
}

/* Mode Tabs */
.calc-mode-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.375rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.calc-mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calc-mode-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.calc-mode-tab.active {
    color: #10b981;
    background: var(--bg-card);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.calc-mode-tab .tab-icon {
    font-size: 1.1rem;
}

/* =====================================================
   FORMS
   ===================================================== */
.calc-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-row--optional label {
    color: var(--text-secondary);
}

.optional-tag {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Input Styles */
.calc-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    -moz-appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.calc-input::placeholder {
    color: var(--text-tertiary);
}

/* Input with Currency */
.input-with-currency {
    display: flex;
    gap: 0.5rem;
}

.input-with-currency .calc-input {
    flex: 1;
}

.currency-select {
    width: 100px;
    padding: 0.875rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Input with Unit */
.input-with-unit {
    position: relative;
}

.input-with-unit .calc-input {
    padding-right: 3rem;
}

.input-unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

/* Input with Select */
.input-with-select {
    display: flex;
    gap: 0.5rem;
}

.input-with-select .calc-input {
    flex: 1;
}

.unit-select {
    width: 100px;
    padding: 0.875rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Input with Currency Display */
.input-with-currency-display {
    position: relative;
}

.input-with-currency-display .calc-input {
    padding-right: 3rem;
}

.currency-display {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-tertiary);
}

/* Calculate Button */
.btn-calculate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-calculate:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

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

/* =====================================================
   MESSAGE DISPLAY
   ===================================================== */
.calc-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.calc-message.calc-message--error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.calc-message.calc-message--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.calc-message .message-icon {
    font-size: 1.25rem;
}

/* =====================================================
   RESULTS
   ===================================================== */
.calc-results {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

/* Main Result */
.result-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.result-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.result-sub {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.stat-icon {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

/* =====================================================
   CHART
   ===================================================== */
.result-chart {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1rem;
}

.donut-chart {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
}

.donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-ring {
    fill: none;
    stroke: var(--bg-tertiary);
    stroke-width: 18;
}

.donut-segment {
    fill: none;
    stroke-width: 18;
    stroke-dasharray: 0 314;
    transition: stroke-dasharray 0.6s ease;
}

.donut-segment--principal {
    stroke: #10b981;
}

.donut-segment--interest {
    stroke: #f59e0b;
}

.donut-segment--insurance {
    stroke: #8b5cf6;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-total {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

/* Chart Legend */
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-item--principal .legend-color {
    background: #10b981;
}

.legend-item--interest .legend-color {
    background: #f59e0b;
}

.legend-item--insurance .legend-color {
    background: #8b5cf6;
}

.legend-label {
    flex: 1;
    color: var(--text-secondary);
}

.legend-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

/* =====================================================
   AMORTIZATION SCHEDULE
   ===================================================== */
.amortization-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.amortization-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-secondary);
    cursor: pointer;
    list-style: none;
}

.amortization-toggle::-webkit-details-marker {
    display: none;
}

.toggle-icon {
    font-size: 1.1rem;
}

.toggle-text {
    flex: 1;
}

.toggle-arrow {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.amortization-section[open] .toggle-arrow {
    transform: rotate(180deg);
}

.amortization-content {
    border-top: 1px solid var(--border-color);
}

.amortization-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.btn-export {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-export:hover {
    background: rgba(59, 130, 246, 0.2);
}

.amortization-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.amortization-table th {
    position: sticky;
    top: 0;
    padding: 0.75rem 0.5rem;
    font-weight: 600;
    text-align: right;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.amortization-table th:first-child {
    text-align: center;
}

.amortization-table td {
    padding: 0.625rem 0.5rem;
    text-align: right;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
}

.amortization-table td:first-child {
    text-align: center;
    font-weight: 500;
    color: var(--text-secondary);
}

.amortization-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.amortization-table tbody tr.year-row {
    background: rgba(16, 185, 129, 0.05);
}

.amortization-table tbody tr.year-row td {
    font-weight: 600;
    color: #10b981;
}

/* =====================================================
   EXAMPLES PANEL
   ===================================================== */
.examples-panel {
    padding: 1.25rem;
    background: var(--bg-tertiary);
}

.examples-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.examples-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.example-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.875rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.example-btn:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.example-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.example-details {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.02em;
}

/* Dark theme - better contrast for examples */
[data-theme="dark"] .example-details {
    color: #9ca3af;
}

/* Regional Settings */
.regional-settings {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.regional-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
}

.regional-select-wrapper {
    margin-bottom: 0.75rem;
}

.regional-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
}

.regional-info {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin: 0;
}

/* =====================================================
   INFO NOTICE
   ===================================================== */
.mortgage-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin: 0 1.5rem 1.5rem;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.mortgage-info span {
    font-size: 1rem;
}

.mortgage-info p {
    margin: 0;
    line-height: 1.5;
}

/* =====================================================
   DESIGN VARIANTS
   ===================================================== */

/* Modern Design */
.mortgage-calculator[data-design="modern"] {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-secondary));
}

.mortgage-calculator[data-design="modern"] .calc-input {
    border-radius: var(--radius-lg);
    background: var(--bg-card);
}

.mortgage-calculator[data-design="modern"] .btn-calculate {
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #34d399, #10b981);
}

.mortgage-calculator[data-design="modern"] .result-main {
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(52, 211, 153, 0.1));
}

/* Tech Design */
.mortgage-calculator[data-design="tech"] {
    background: #0a0a0f;
}

.mortgage-calculator[data-design="tech"] .calc-mode-tabs {
    background: #111118;
}

.mortgage-calculator[data-design="tech"] .calc-mode-tab {
    color: #6b7280;
}

.mortgage-calculator[data-design="tech"] .calc-mode-tab.active {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.mortgage-calculator[data-design="tech"] .form-row label {
    color: #9ca3af;
}

.mortgage-calculator[data-design="tech"] .calc-input {
    background: #111118;
    border-color: #1f1f2a;
    color: #fff;
}

.mortgage-calculator[data-design="tech"] .calc-input:focus {
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.mortgage-calculator[data-design="tech"] .btn-calculate {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000;
}

.mortgage-calculator[data-design="tech"] .result-main {
    background: linear-gradient(145deg, rgba(0, 255, 136, 0.1), rgba(0, 204, 106, 0.05));
    border-color: rgba(0, 255, 136, 0.2);
}

.mortgage-calculator[data-design="tech"] .result-value {
    color: #00ff88;
}

.mortgage-calculator[data-design="tech"] .stat-item {
    background: #111118;
}

.mortgage-calculator[data-design="tech"] .stat-value {
    color: #fff;
}

/* Minimal Design */
.mortgage-calculator[data-design="minimal"] {
    background: var(--bg-card);
}

.mortgage-calculator[data-design="minimal"] .calc-mode-tabs {
    background: transparent;
    border: 1px solid var(--border-color);
}

.mortgage-calculator[data-design="minimal"] .calc-input {
    background: transparent;
    border-width: 0 0 2px 0;
    border-radius: 0;
    padding-left: 0;
}

.mortgage-calculator[data-design="minimal"] .calc-input:focus {
    box-shadow: none;
    border-color: #10b981;
}

.mortgage-calculator[data-design="minimal"] .btn-calculate {
    background: transparent;
    border: 2px solid #10b981;
    color: #10b981;
}

.mortgage-calculator[data-design="minimal"] .btn-calculate:hover {
    background: #10b981;
    color: #fff;
    box-shadow: none;
}

.mortgage-calculator[data-design="minimal"] .result-main {
    background: transparent;
    border-style: dashed;
}

/* =====================================================
   SEO CONTENT
   ===================================================== */
.tool-content {
    margin-top: 3rem;
}

.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.tool-section > p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
}

.step-card__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =====================================================
   HIDDEN STATE
   ===================================================== */
[hidden] {
    display: none !important;
}

/* =====================================================
   POPUP STYLES
   ===================================================== */
.popup-calculator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    min-width: 420px;
    max-width: 95vw;
    max-height: 95vh;
    overflow: hidden;
}

.popup-calculator__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: move;
}

.popup-calculator__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.popup-calculator__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.popup-calculator__close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.popup-calculator__content {
    padding: 1rem;
    max-height: calc(95vh - 60px);
    overflow-y: auto;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
    .mortgage-container {
        grid-template-columns: 1fr;
    }
    
    .mortgage-calculator {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .examples-panel {
        padding: 1.5rem;
    }
    
    .examples-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 640px) {
    .tool-page {
        padding: 1rem;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-header__text h1 {
        font-size: 1.5rem;
    }
    
    .mortgage-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mortgage-toolbar__left,
    .mortgage-toolbar__right {
        justify-content: center;
    }
    
    .mortgage-calculator {
        padding: 1rem;
    }
    
    .calc-mode-tabs {
        flex-direction: column;
    }
    
    .calc-mode-tab {
        padding: 0.625rem 1rem;
    }
    
    .calc-mode-tab .tab-text {
        font-size: 0.8rem;
    }
    
    .input-with-currency {
        flex-direction: column;
    }
    
    .input-with-currency .currency-select {
        width: 100%;
    }
    
    .input-with-select {
        flex-direction: column;
    }
    
    .input-with-select .unit-select {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .result-value {
        font-size: 1.75rem;
    }
    
    .btn-popup__text {
        display: none;
    }
    
    .examples-list {
        grid-template-columns: 1fr;
    }
    
    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .mortgage-info {
        margin: 0 1rem 1rem;
    }
    
    .popup-calculator {
        min-width: auto;
        width: 95vw;
    }
}

@media (max-width: 480px) {
    .design-selector label {
        display: none;
    }
    
    .current-date-banner {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        text-align: center;
    }
    
    .current-date-banner__text {
        font-size: 0.95rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .amortization-table th,
    .amortization-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
}
