/* Sell vs Keep BTL Calculator Styles */
/* All scoped under .svk- to avoid theme clashes */

.svk-root {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.svk-container {
    max-width: 1120px;
    margin: 0 auto 2.5rem;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
    color: #0f172a;
}

.svk-loading {
    padding: 2rem;
    text-align: center;
    font-size: 1rem;
    color: #64748b;
    background: #f0f8ff;
    border-radius: 10px;
    border: 1px solid #d1e7dd;
}

/* Layout */

/* Input sections are now full width, no special styling needed */

.svk-fullwidth-section {
    margin-top: 1rem;
}

/* Error display */
.svk-error-box {
    background: #fef2f2;
    border: 2px solid #dc2626;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    color: #991b1b;
}

.svk-error-box ul {
    margin: 0.5rem 0 0;
    padding-left: 1.5rem;
}

.svk-error-box li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* Card */

.svk-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    padding: 1rem 1.1rem 1.1rem;
}

.svk-step {
    position: relative;
}

.svk-step-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.svk-step-num {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.svk-step-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.svk-step-desc {
    margin: 0.1rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

/* Fields */

.svk-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.svk-fields--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 768px) {
    .svk-fields--two {
        grid-template-columns: minmax(0, 1fr);
    }
}

.svk-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.svk-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #111827;
}

.svk-input {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.4rem 0.6rem;
    font-size: 0.88rem;
    width: 100%;
    box-sizing: border-box;
    background-color: #f9fafb;
    color: #111827;
}

.svk-input:focus {
    outline: 2px solid #0f172a;
    outline-offset: 1px;
    background: #ffffff;
}

.svk-field-note {
    font-size: 0.75rem;
    color: #6b7280;
    padding-top: 0.2rem;
}

/* Buttons */

.svk-btn {
    border-radius: 999px;
    border: 1px solid #0f172a;
    background: #0f172a;
    color: #f9fafb;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.svk-btn:hover {
    background: #020617;
}

.svk-btn--add {
    margin-bottom: 0.5rem;
}

.svk-btn--ghost {
    background: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}

.svk-btn--ghost:hover {
    background: #f3f4f6;
}

.svk-btn--danger {
    color: #b91c1c;
    border-color: #fecaca;
}

.svk-btn--danger:hover {
    background: #fef2f2;
}

/* Property cards */

.svk-property-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.svk-property-card {
    border-radius: 10px;
    border: 1px dashed #e5e7eb;
    padding: 0.75rem 0.8rem;
}

.svk-property-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.svk-property-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1 1 auto;
}

.svk-property-title-input {
    font-weight: 600;
    font-size: 0.9rem;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.svk-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #4b5563;
}

.svk-property-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Summary */

.svk-summary-title {
    margin: 0 0 1rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.svk-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .svk-summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.svk-summary-item {
    border-radius: 10px;
    border: 1px dashed #e5e7eb;
    padding: 0.7rem 0.75rem;
}

.svk-summary-heading {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.svk-summary-big {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.svk-summary-label {
    margin: 0.15rem 0 0.2rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.svk-summary-sub {
    margin: 0.1rem 0;
    font-size: 0.8rem;
    color: #4b5563;
}

.svk-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.svk-badge {
    font-size: 0.76rem;
    padding: 0.3rem 0.5rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.svk-badge--muted {
    background: #f9fafb;
    color: #4b5563;
    border-color: #e5e7eb;
}

.svk-assumptions {
    margin: 0.6rem 0 0;
    font-size: 0.75rem;
    color: #6b7280;
    padding: 0.75rem;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
}

/* Charts */

.svk-charts-title {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.svk-charts-subtitle {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.svk-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .svk-chart-grid {
        grid-template-columns: 1fr;
    }
}

.svk-chart-block {
    margin-bottom: 0;
}

.svk-chart-heading {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.svk-chart-comparison {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.svk-chart-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.svk-chart-item-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.svk-chart-bar-container {
    position: relative;
    width: 100%;
    height: 36px;
    border-radius: 6px;
    background: #f3f4f6;
    overflow: hidden;
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
}

.svk-chart-bar {
    height: 100%;
    border-radius: 6px 0 0 6px;
    transition: width 0.3s ease;
    position: relative;
    min-width: 0;
}

.svk-chart-bar--sell {
    background: #0f172a;
}

.svk-chart-bar--keep {
    background: #16a34a;
}

.svk-chart-value {
    position: absolute;
    right: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    z-index: 1;
    white-space: nowrap;
}

.svk-chart-item--sell .svk-chart-value {
    color: #0f172a;
}

.svk-chart-item--keep .svk-chart-value {
    color: #166534;
}

/* Tables */

.svk-table-title {
    margin: 0 0 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.svk-table-desc {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.svk-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.svk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 680px;
}

.svk-table th,
.svk-table td {
    padding: 0.4rem 0.45rem;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.svk-table th:first-child,
.svk-table td:first-child {
    text-align: left;
}

.svk-table thead th {
    background: #f3f4f6;
    font-weight: 600;
    color: #374151;
}

/* Misc */

.svk-table-card {
    margin-bottom: 0.25rem;
}

.svk-table-card--fullwidth {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.svk-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.svk-fullwidth-section {
    grid-column: 1 / -1;
    margin-top: 1rem;
}

.svk-col--outputs:empty {
    display: none;
}

.svk-charts {
    margin-bottom: 0.5rem;
}

.svk-charts-subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Table color coding */
.svk-th-option-a {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.svk-th-option-b {
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.svk-td-option-a {
    background: #f8fafc;
}

.svk-td-option-b {
    background: #f7fef7;
}

.svk-table-row-sell-age {
    background: #fef3c7 !important;
    border-top: 2px solid #f59e0b;
    border-bottom: 2px solid #f59e0b;
}

.svk-table-row-sell-age td {
    font-weight: 600;
}

/* Export Section */

.svk-export-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.svk-export-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.svk-btn--export {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #0f172a;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.svk-btn--export:hover {
    background: #f8fafc;
    border-color: #334155;
}

.svk-export-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.svk-table-subheader th {
    background: #f9fafb !important;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.3rem 0.45rem;
}

.svk-summary-item--option-a {
    border-left: 3px solid #0f172a;
}

.svk-summary-item--option-b {
    border-left: 3px solid #16a34a;
}

.svk-summary-section {
    margin-bottom: 0.5rem;
}
