/* customer.css — Styles specific to the customer (consumer) page */

/* ── Default Data Table (below chart) ── */
.default-data { display: none; }
.default-data.active {
    display: flex;
    flex-direction: column;
    min-height: 120px;
    overflow: hidden;
}
.default-data-header {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}
.default-data-header h4 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    margin: 0;
}
.default-table-wrap {
    flex: 1;
    overflow: auto;
    padding: 0 20px 12px;
    position: relative;
}

/* ── Resize Handles ── */
.resize-handle-h {
    flex: none;
    height: 5px;
    cursor: ns-resize;
    background: var(--border);
    transition: background 0.15s;
}
.resize-handle-h:hover { background: var(--accent); }

.resize-handle-v {
    flex: none;
    width: 5px;
    cursor: ew-resize;
    background: var(--border);
    transition: background 0.15s;
}
.resize-handle-v:hover { background: var(--accent); }

/* Default view with data: split chart + table vertically */
.main.has-default-data .chart-container {
    flex: 55;
    min-height: 150px;
}
.main.has-default-data .default-data {
    flex: 45;
    min-height: 80px;
}

/* ── Month Navigator (between chart and table) ── */
.month-nav {
    flex: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    font-size: 12px;
}
.month-nav input[type="range"] { flex: 1; }
.month-nav button {
    width: 28px; height: 24px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.month-nav button:hover { background: #f1f5f9; border-color: var(--accent); }
#month-label {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 130px;
    text-align: right;
}

/* ── Educational Sections ── */
.edu-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}
.edu-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}
.edu-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}
.edu-section p {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 14px;
}
.edu-section + .edu-section {
    border-top: 1px solid var(--border);
}

/* Product explainer cards */
.product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: box-shadow 0.2s;
}
.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.product-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--accent);
}
.product-card .product-card-type {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}
.product-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 8px;
}
.product-card .product-card-scenario {
    font-size: 13px;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 6px;
    color: var(--green);
    font-weight: 500;
    margin-bottom: 8px;
}
.product-card .product-card-cost {
    font-size: 13px;
    color: var(--text-muted);
}

/* Why-better callout boxes */
.why-better {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.why-better-item {
    padding: 16px;
    background: #eff6ff;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}
.why-better-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
.why-better-item p {
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
    margin: 0;
}

/* Fee explainer table */
.fee-explainer {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 14px;
}
.fee-explainer th {
    text-align: left;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fee-explainer td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.fee-explainer tr:hover { background: #f8fafc; }

/* ── FAQ Section ── */
.faq-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
    border-top: 1px solid var(--border);
}
.faq-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text);
}
.faq-category {
    margin-bottom: 24px;
}
.faq-category h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.faq-section details {
    border-bottom: 1px solid var(--border);
}
.faq-section details[open] {
    background: #f8fafc;
    border-radius: 6px;
    margin-bottom: 4px;
}
.faq-section summary {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.faq-section details[open] summary::after {
    content: '\2212';
}
.faq-section summary:hover {
    color: var(--accent);
}
.faq-section .faq-answer {
    padding: 0 16px 14px;
    font-size: 14px;
    line-height: 1.7;
    color: #475569;
}

/* Cross-link banner */
.cross-link {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    font-size: 14px;
}
.cross-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.cross-link a:hover {
    text-decoration: underline;
}

/* ── Chart Actions (fee drag toggle, save/compare) ── */
.chart-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.chart-btn {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.chart-btn:hover {
    background: #f1f5f9;
    border-color: var(--accent);
}
.chart-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.chart-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Fee Summary Bar ── */
.fee-summary {
    display: flex;
    gap: 24px;
    padding: 6px 20px;
    background: #fef2f2;
    border-bottom: 1px solid #fecaca;
    font-size: 13px;
    color: #991b1b;
}
.fee-summary strong {
    font-weight: 700;
    color: #dc2626;
}

/* ── Saved Scenario Chips ── */
.saved-scenarios {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 20px;
    min-height: 0;
}
.saved-scenarios:empty {
    display: none;
}
.scenario-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: #1e293b;
    color: #fff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}
.scenario-chip button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    cursor: pointer;
    padding: 0 0 0 2px;
    line-height: 1;
}
.scenario-chip button:hover {
    color: #fff;
}

/* ── Comparison Table ── */
.comparison-table {
    padding: 8px 20px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.comparison-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.comparison-tbl th {
    text-align: right;
    padding: 6px 12px;
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}
.comparison-tbl th:first-child {
    text-align: left;
    color: var(--text-muted);
}
.comparison-tbl td {
    text-align: right;
    padding: 4px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.comparison-tbl td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text-muted);
}
.comparison-advantage td {
    border-top: 2px solid var(--border);
    padding-top: 6px;
}

/* ── Feedback Widget ── */
.feedback-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.feedback-prompt { font-weight: 500; }
.feedback-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}
.feedback-btn:hover { border-color: var(--accent); background: #eff6ff; }
.feedback-btn.selected { background: #dbeafe; border-color: var(--accent); }
.feedback-text-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
}
.feedback-text-wrap input {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    width: 200px;
}
.feedback-send {
    padding: 4px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.feedback-send:hover { opacity: 0.9; }
.feedback-thanks { color: var(--green); font-weight: 500; }
