/* =============================================
   Social Security Calculator Pro – Stylesheet
   ============================================= */

.ssc-wrapper {
    max-width: 920px; margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff; border: 1px solid #e0e4ea; border-radius: 12px;
    overflow: hidden; box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* Header */
.ssc-header { background: linear-gradient(135deg, #0369a1 0%, #075985 100%); padding: 28px 32px; text-align: center; }
.ssc-header-icon { font-size: 36px; margin-bottom: 8px; }
.ssc-title { margin: 0 0 6px 0 !important; font-size: 24px !important; font-weight: 700 !important; color: #fff !important; }
.ssc-subtitle { margin: 0 !important; font-size: 13px; color: rgba(255,255,255,0.78); }

/* Tabs */
.ssc-tabs { display: flex; background: #f9fafb; border-bottom: 2px solid #e5e7eb; }
.ssc-tab {
    flex: 1; padding: 13px 8px; font-size: 12px; font-weight: 600; color: #6b7280;
    background: transparent; border: none; border-bottom: 3px solid transparent;
    cursor: pointer; transition: all 0.2s; margin-bottom: -2px;
}
.ssc-tab:hover { color: #0369a1; background: #f0f9ff; }
.ssc-tab-active { color: #0369a1 !important; border-bottom-color: #0369a1 !important; background: #fff !important; }

/* Tab content */
.ssc-tab-content { display: none; padding: 26px 30px; }
.ssc-tab-active { display: block; }

/* Grid */
.ssc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* Section labels */
.ssc-section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
    color: #0369a1; margin: 16px 0 10px; padding-bottom: 6px; border-bottom: 2px solid #e0f2fe;
}
.ssc-section-label:first-child { margin-top: 0; }

/* Fields */
.ssc-field { margin-bottom: 12px; }
.ssc-label { display: block; font-size: 12px; font-weight: 600; color: #4b5563; margin-bottom: 5px; }
.ssc-optional { font-weight: 400; color: #9ca3af; font-size: 11px; }
.ssc-hint { font-size: 11px; color: #9ca3af; margin-top: 4px; line-height: 1.4; }

.ssc-input-wrap { position: relative; }
.ssc-prefix { position: absolute; left: 12px; font-size: 14px; font-weight: 600; color: #6b7280; top: 50%; transform: translateY(-50%); pointer-events: none; }
.ssc-input {
    width: 100%; padding: 9px 12px 9px 26px; font-size: 14px; font-weight: 500;
    color: #111827; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 7px;
    outline: none; box-sizing: border-box; transition: border-color 0.2s; -moz-appearance: textfield;
}
.ssc-input::-webkit-outer-spin-button, .ssc-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.ssc-input:focus { border-color: #0369a1; background: #fff; box-shadow: 0 0 0 3px rgba(3,105,161,0.1); }
.ssc-input-full { padding-left: 12px; }

.ssc-select {
    width: 100%; padding: 9px 36px 9px 12px; font-size: 14px; font-weight: 500;
    color: #111827; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 7px;
    outline: none; cursor: pointer; appearance: none; box-sizing: border-box;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
    transition: border-color 0.2s;
}
.ssc-select:focus { border-color: #0369a1; }

.ssc-calc-btn {
    width: 100%; padding: 13px; font-size: 15px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #0369a1, #075985); border: none; border-radius: 8px;
    cursor: pointer; margin-top: 8px; transition: all 0.2s;
}
.ssc-calc-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(3,105,161,0.4); }

/* Results */
.ssc-results { display: flex; flex-direction: column; gap: 14px; }

.ssc-result-hero {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 2px solid #bae6fd; border-radius: 10px; padding: 20px; text-align: center;
}
.ssc-result-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; color: #6b7280; margin-bottom: 8px; }
.ssc-result-price { font-size: 42px; font-weight: 800; color: #0369a1; letter-spacing: -1.5px; line-height: 1; }
.ssc-result-sub { font-size: 12px; color: #6b7280; margin-top: 6px; }

/* Age comparison cards */
.ssc-age-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.ssc-age-card {
    background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 8px;
    padding: 14px 10px; text-align: center; transition: all 0.2s;
}
.ssc-age-fra { background: #f0f9ff; border-color: #7dd3fc; }
.ssc-age-card.ssc-selected { border-color: #0369a1; background: #e0f2fe; }
.ssc-age-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #6b7280; margin-bottom: 6px; letter-spacing: 0.5px; }
.ssc-age-amount { font-size: 20px; font-weight: 800; color: #0369a1; }
.ssc-age-label { font-size: 11px; color: #6b7280; margin-top: 3px; }
.ssc-age-pct { font-size: 11px; color: #0369a1; font-weight: 600; margin-top: 3px; }

/* Metrics */
.ssc-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.ssc-metric { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px 8px; text-align: center; }
.ssc-metric-val { font-size: 15px; font-weight: 700; color: #111827; }
.ssc-metric-label { font-size: 11px; color: #6b7280; margin-top: 3px; }

/* FRA card */
.ssc-fra-card { background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; padding: 14px; }
.ssc-fra-title { font-size: 12px; font-weight: 700; color: #78350f; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.ssc-fra-details { font-size: 13px; color: #92400e; line-height: 1.6; }

/* Adjust card */
.ssc-adjust-card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px; }
.ssc-adjust-title { font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.ssc-adjust-body { font-size: 13px; color: #4b5563; line-height: 1.6; }

/* Spousal breakdown */
.ssc-spousal-breakdown { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px; }
.ssc-sb-title { font-size: 12px; font-weight: 700; color: #374151; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.ssc-sb-row { display: flex; justify-content: space-between; font-size: 12px; color: #4b5563; padding: 5px 0; border-bottom: 1px solid #f3f4f6; }
.ssc-sb-row:last-child { border-bottom: none; }

/* Rules box */
.ssc-rules-box { background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 14px; }
.ssc-rules-title { font-size: 12px; font-weight: 700; color: #0c4a6e; margin-bottom: 10px; }
.ssc-rule-item { font-size: 12px; color: #0369a1; padding: 3px 0; }

/* Break-even table */
.ssc-be-table-wrap { }
.ssc-be-table-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #374151; margin-bottom: 8px; }
.ssc-table-scroll { overflow-x: auto; border-radius: 8px; border: 1px solid #e5e7eb; max-height: 280px; overflow-y: auto; }
.ssc-be-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ssc-be-table thead { position: sticky; top: 0; }
.ssc-be-table th { background: #f3f4f6; padding: 8px 10px; text-align: right; font-weight: 600; color: #374151; border-bottom: 2px solid #e5e7eb; }
.ssc-be-table th:first-child { text-align: left; }
.ssc-be-table td { padding: 7px 10px; color: #374151; border-bottom: 1px solid #f3f4f6; text-align: right; }
.ssc-be-table td:first-child { text-align: left; font-weight: 600; }
.ssc-be-table tr.ssc-be-highlight td { background: #f0f9ff; color: #0369a1; font-weight: 700; }
.ssc-be-table tr:last-child td { border-bottom: none; }

/* Lifetime bars */
.ssc-lifetime-bars { }
.ssc-lb-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #374151; margin-bottom: 10px; }
.ssc-lb-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12px; }
.ssc-lb-label { width: 80px; flex-shrink: 0; color: #4b5563; font-weight: 600; }
.ssc-lb-track { flex: 1; height: 18px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.ssc-lb-fill { height: 100%; border-radius: 999px; transition: width 0.6s ease; display: flex; align-items: center; padding-left: 8px; }
.ssc-lb-val { font-weight: 700; color: #111827; width: 70px; text-align: right; flex-shrink: 0; }

/* Tax breakdown */
.ssc-tax-breakdown { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px; }
.ssc-tb-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #374151; margin-bottom: 10px; }
.ssc-tb-row { display: flex; justify-content: space-between; font-size: 12px; color: #4b5563; padding: 5px 0; border-bottom: 1px solid #f3f4f6; }
.ssc-tb-row:last-child { border-bottom: none; }
.ssc-tb-bold { font-weight: 700; color: #111827; }
.ssc-tb-divider { border-top: 2px solid #e5e7eb; margin: 6px 0; }

/* Tax status card */
.ssc-tax-status-card { display: flex; align-items: center; gap: 12px; background: #f9fafb; border: 2px solid #e5e7eb; border-radius: 8px; padding: 14px; }
.ssc-ts-icon { font-size: 28px; flex-shrink: 0; }
.ssc-ts-text { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.4; }
.ssc-tax-status-good { background: #f0fdf8 !important; border-color: #a7f3d0 !important; }
.ssc-tax-status-mid  { background: #fefce8 !important; border-color: #fde68a !important; }
.ssc-tax-status-high { background: #fff1f2 !important; border-color: #fca5a5 !important; }

/* Thresholds info */
.ssc-thresholds-info { }
.ssc-ti-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #374151; margin-bottom: 8px; }
.ssc-ti-table { width: 100%; border-collapse: collapse; font-size: 12px; border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; }
.ssc-ti-table th { background: #f3f4f6; padding: 7px 10px; text-align: left; font-weight: 600; color: #374151; border-bottom: 1px solid #e5e7eb; }
.ssc-ti-table td { padding: 7px 10px; color: #4b5563; border-bottom: 1px solid #f3f4f6; }
.ssc-ti-table tr:last-child td { border-bottom: none; }

.ssc-disclaimer { font-size: 11px; color: #9ca3af; margin: 0 !important; line-height: 1.5; }

@media (max-width: 680px) {
    .ssc-grid { grid-template-columns: 1fr; }
    .ssc-tab-content { padding: 18px 14px; }
    .ssc-tab { font-size: 10px; padding: 10px 4px; }
    .ssc-result-price { font-size: 32px; }
    .ssc-age-cards { grid-template-columns: repeat(3,1fr); }
    .ssc-metrics { grid-template-columns: repeat(3,1fr); }
}
