/**
 * MSW Downsizing Decision Calculator
 * v1.1.0 - Senior-friendly design
 */
.msw-downsizing-calculator { max-width: 900px; margin: 0 auto; font-family: 'Verdana', 'Arial', sans-serif; font-size: 18px; line-height: 1.6; color: #3A4A6B; padding: 30px; }
.msw-downsizing-calculator *, .msw-downsizing-calculator *::before, .msw-downsizing-calculator *::after { box-sizing: border-box; }

/* HEADER */
.msw-calculator__header { text-align: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 3px solid #5B6B8D; }
.msw-calculator__title { font-size: 32px; color: #3A4A6B; margin: 0 0 10px; }
.msw-calculator__subtitle { font-size: 18px; color: #666; margin: 0; }

/* INSTRUCTIONS */
.msw-calculator__instructions { background: #F0F4F8; border: 1px solid #D0D8E4; border-radius: 8px; padding: 20px; margin-bottom: 30px; font-size: 16px; color: #555; }

/* FORM SECTIONS */
.msw-form-section { background: #FFF; border: 2px solid #E8E8E8; border-radius: 10px; padding: 24px; margin-bottom: 20px; }
.msw-form-section__title { font-size: 22px; color: #3A4A6B; margin: 0 0 16px; }

/* FORM ROWS */
.msw-form-row { margin-bottom: 16px; }
.msw-form-row--two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.msw-form-label { display: block; font-size: 16px; font-weight: 600; color: #555; margin-bottom: 6px; }
.msw-form-input, .msw-form-select { width: 100%; font-size: 18px; border: 2px solid #D0D8E4; border-radius: 8px; background: #FFF; color: #3A4A6B; }
.msw-form-input:focus, .msw-form-select:focus { border-color: #5B6B8D; outline: none; box-shadow: 0 0 0 3px rgba(91,107,141,0.15); }

/* CHECKBOXES */
.msw-checkbox-label { display: flex; align-items: center; gap: 10px; font-size: 17px; cursor: pointer; padding: 8px 0; }
.msw-checkbox { width: 22px; height: 22px; accent-color: #5B6B8D; cursor: pointer; }

/* BUTTONS */
.msw-button { font-size: 18px; font-weight: 700; padding: 14px 28px; border: none; border-radius: 10px; cursor: pointer; transition: all 0.2s; }
.msw-button--primary { background: #5B6B8D; color: #FFF; }
.msw-button--primary:hover { background: #3A4A6B; }
.msw-button--large { font-size: 20px; padding: 16px 36px; width: 100%; }

.msw-form-actions { text-align: center; }

/* ERROR */
.msw-error-message { background: #FFF5F5; border: 1px solid #C76868; color: #8B2E2E; padding: 14px; border-radius: 8px; margin-top: 12px; font-size: 16px; text-align: center; }

/* RESULTS */
.msw-results { margin-top: 30px; }
.msw-results__title { font-size: 26px; text-align: center; color: #3A4A6B; margin: 0 0 20px; }

/* RESULT CARDS */
.msw-results-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.msw-result-card { background: #F8F9FA; border: 2px solid #E0E6ED; border-radius: 12px; padding: 18px; text-align: center; }
.msw-result-card--primary { background: #EFF6EE; border-color: #6B9F78; }
.msw-result-card--negative { background: #FFF5F5; border-color: #C76868; }
.msw-result-card__label { font-size: 13px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.msw-result-card__value { font-size: 24px; font-weight: 800; color: #3A4A6B; margin: 6px 0; }
.msw-result-card__note { font-size: 13px; color: #666; }

/* BREAKDOWN */
.msw-breakdown-section { background: #FFF; border: 2px solid #E8E8E8; border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.msw-breakdown-section h4 { font-size: 20px; color: #3A4A6B; margin: 0 0 14px; }
.msw-breakdown-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #F0F0F0; font-size: 16px; }
.msw-breakdown-item:last-child { border-bottom: none; }
.msw-breakdown-highlight { font-weight: 600; }
.msw-breakdown-total { font-weight: 800; font-size: 18px; border-top: 2px solid #3A4A6B; padding-top: 12px; margin-top: 4px; }
.msw-breakdown-label { color: #555; }
.msw-breakdown-amount { font-weight: 700; color: #3A4A6B; }

/* WARNINGS */
.msw-warnings-section { margin-bottom: 20px; }
.msw-warning-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #FFFBF0; border: 1px solid #F0D68A; border-radius: 10px; margin-bottom: 10px; }
.msw-warning-icon { font-size: 24px; flex-shrink: 0; }
.msw-warning-text { font-size: 16px; color: #6B5B2A; line-height: 1.5; }

/* ACTIONS */
.msw-calc-actions { display: flex; gap: 15px; justify-content: center; margin-top: 30px; padding-top: 20px; border-top: 2px solid #E8E8E8; flex-wrap: wrap; }
.msw-calc-actions__save { background: #6B9F78; color: #FFF; }
.msw-calc-actions__save:hover { background: #5A8A67; }
.msw-calc-actions__print { background: #FFF; color: #3A4A6B; border: 2px solid #3A4A6B; }
.msw-calc-actions__print:hover { background: #3A4A6B; color: #FFF; }

/* TIPS */
.msw-tips { background: #F9F9F9; padding: 24px; border-radius: 8px; border: 2px solid #E8E8E8; margin-top: 30px; }
.msw-tips__title { font-size: 22px; color: #3A4A6B; margin: 0 0 16px; }
.msw-tips__list { list-style: none; padding: 0; margin: 0; }
.msw-tips__list li { padding: 12px 0 12px 35px; position: relative; border-bottom: 1px solid #E8E8E8; font-size: 16px; }
.msw-tips__list li:last-child { border-bottom: none; }
.msw-tips__list li::before { content: "🏠"; position: absolute; left: 0; font-size: 18px; }

/* PRINT */
@media print {
    .msw-calculator__instructions, .msw-form-section, .msw-calc-actions, .msw-tips, .msw-button { display: none !important; }
    .msw-results { display: block !important; }
    body { background: white; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .msw-downsizing-calculator { padding: 20px 15px; }
    .msw-calculator__title { font-size: 26px; }
    .msw-form-row--two-col { grid-template-columns: 1fr; }
    .msw-results-grid { grid-template-columns: 1fr 1fr; }
    .msw-calc-actions { flex-direction: column; }
    .msw-calc-actions .msw-button { width: 100%; }
}
@media (max-width: 480px) {
    .msw-results-grid { grid-template-columns: 1fr; }
}

*:focus-visible { outline: 3px solid #5B6B8D; outline-offset: 2px; }
