/**
 * Advanced Assets Mode Styles
 * Styles for the advanced mode toggle and advanced asset sections
 */

/* Advanced Mode Toggle */
.advanced-mode-toggle {
    margin: 24px 0;
    padding: 16px;
    background: linear-gradient(135deg, #f0f4ff 0%, #f5f0ff 100%);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.toggle-label {
    font-weight: 600;
    color: #4a5568;
}

.toggle-hint {
    width: 100%;
    font-size: 0.85rem;
    color: #718096;
    margin-top: 4px;
}

/* Advanced Assets Container */
.advanced-assets-container {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px dashed #e2e8f0;
}

/* Advanced Section Titles */
.section-title-advanced {
    color: #667eea;
    position: relative;
}

.section-title-advanced::before {
    content: "★";
    margin-right: 8px;
    font-size: 0.8em;
}

/* Stock/ETF Method Selector */
.input-method {
    min-width: 100px;
}

/* Retirement Account Checkbox */
.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    margin-left: 8px;
}

.checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Receivables Options */
.receivables-options {
    margin: 12px 0 8px;
    padding: 10px 12px;
    background: #f7fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Business Inventory Section */
.business-inventory-section {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}

.business-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.business-row label {
    min-width: 160px;
    margin-bottom: 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.business-row input[type="text"],
.business-row input[type="number"] {
    flex: 1;
    max-width: 200px;
}

.business-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.business-input-group input {
    flex: 1;
    max-width: 200px;
}

.business-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-weight: 600;
}

/* Property Rental Note */
.property-rental-note {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fffbeb;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
    font-size: 0.85rem;
    color: #92400e;
}

/* Debt Policy Container */
.debt-policy-container {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #faf5ff;
    border-radius: 8px;
    border: 1px solid #e9d8fd;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.debt-policy-container label {
    margin-bottom: 0;
    font-weight: 500;
}

.input-policy {
    min-width: 180px;
}

.policy-hint {
    font-size: 0.85rem;
    color: #718096;
    width: 100%;
}

/* Short-term Payables Container */
.short-term-payables-container {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
}

.input-payable-type {
    min-width: 100px;
}

/* Advanced Subtotals in Results */
.advanced-subtotals {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.advanced-subtotals .result-row {
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.05));
}

.advanced-subtotals .result-label {
    font-size: 0.9rem;
}

/* Likelihood Selector */
.input-likelihood {
    min-width: 100px;
}

/* Intent Selector */
.input-intent {
    min-width: 120px;
}

/* Property Row - Show rental income field for rental intent */
.asset-row[data-type="property"] .rental-income-field {
    display: none;
}

.asset-row[data-type="property"].rental-intent .rental-income-field {
    display: block;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .advanced-mode-toggle {
        padding: 12px;
    }

    .toggle-hint {
        font-size: 0.8rem;
    }

    .business-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .business-row label {
        min-width: auto;
    }

    .business-row input[type="text"],
    .business-row input[type="number"] {
        max-width: 100%;
        width: 100%;
    }

    .business-input-group {
        width: 100%;
    }

    .business-input-group input {
        max-width: none;
    }

    .debt-policy-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .checkbox-inline {
        margin-left: 0;
        margin-top: 8px;
    }
}

@media (max-width: 640px) {
    .business-subtotal {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}
