/* ============================================================
   MTF Sizing Dashboard - Clothing Fit Recommendation
   Scoped to #mtf-sizing-dashboard for Avada isolation
   ============================================================ */

/* -- Root -- */
#mtf-sizing-dashboard {
    background: #050505 !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    position: relative;
    padding: 48px 32px !important;
    margin: -40px -40px !important;
    min-height: 600px;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}
#mtf-sizing-dashboard::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    pointer-events: none;
    z-index: 0;
}
#mtf-sizing-dashboard::after {
    content: '';
    position: absolute;
    top: -200px;
    right: 10%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,90,31,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
#mtf-sizing-dashboard > * { position: relative; z-index: 1; }
#mtf-sizing-dashboard,
#mtf-sizing-dashboard *:not(svg):not(path):not(canvas):not(i) {
    font-family: 'Inter', sans-serif !important;
    box-sizing: border-box;
}
#mtf-sizing-dashboard .mtf-card,
#mtf-sizing-dashboard .mtf-card__title,
#mtf-sizing-dashboard .mtf-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
#mtf-sizing-dashboard .mtf-header { display: none !important; }
#mtf-sizing-dashboard h1,
#mtf-sizing-dashboard h2,
#mtf-sizing-dashboard h3 {
    color: #ffffff !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
}

/* -- Glass panel -- */
#mtf-sizing-dashboard .sz-glass {
    background: linear-gradient(145deg, rgba(26,26,26,0.8) 0%, rgba(17,17,17,0.9) 100%) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

/* -- Hero -- */
#mtf-sizing-dashboard .sz-hero { margin-bottom: 32px; }
#mtf-sizing-dashboard .sz-hero h1 {
    font-size: clamp(28px, 4vw, 42px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
#mtf-sizing-dashboard .sz-hero p {
    color: #888888 !important;
    font-size: 15px;
    max-width: 600px;
    line-height: 1.6;
    margin-top: 8px;
}

/* -- Fit Preference -- */
#mtf-sizing-dashboard .sz-fit-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}
#mtf-sizing-dashboard .sz-fit-bar span.sz-fit-label {
    color: #888888 !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-right: 8px;
}
#mtf-sizing-dashboard .sz-fit-btn {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #2a2a2a !important;
    background: transparent !important;
    color: #888888 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s;
}
#mtf-sizing-dashboard .sz-fit-btn:hover {
    color: #ffffff !important;
    border-color: #444 !important;
}
#mtf-sizing-dashboard .sz-fit-btn.sz-fit-active {
    background: rgba(255,90,31,0.12) !important;
    border-color: rgba(255,90,31,0.3) !important;
    color: #ff5a1f !important;
    font-weight: 600 !important;
}

/* -- Garment Tabs -- */
#mtf-sizing-dashboard .sz-tabs {
    display: flex;
    gap: 4px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    width: fit-content;
}
#mtf-sizing-dashboard .sz-tab {
    padding: 10px 20px;
    border-radius: 9px;
    border: none !important;
    background: transparent !important;
    color: #888888 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
#mtf-sizing-dashboard .sz-tab:hover { color: #ffffff !important; }
#mtf-sizing-dashboard .sz-tab.sz-tab-active {
    background: #1a1a1a !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
#mtf-sizing-dashboard .sz-tab i { font-size: 14px; }

/* -- Result Header -- */
#mtf-sizing-dashboard .sz-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
#mtf-sizing-dashboard .sz-result-size {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
#mtf-sizing-dashboard .sz-result-letter {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1;
}
#mtf-sizing-dashboard .sz-result-eu {
    font-size: 18px;
    color: #888888;
    font-weight: 500;
}
#mtf-sizing-dashboard .sz-result-confidence {
    text-align: right;
    min-width: 180px;
}
#mtf-sizing-dashboard .sz-confidence-label {
    display: block;
    font-size: 13px;
    color: #888888;
    margin-bottom: 8px;
    font-weight: 500;
}
#mtf-sizing-dashboard .sz-confidence-bar {
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
#mtf-sizing-dashboard .sz-confidence-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}
#mtf-sizing-dashboard .sz-confidence-pct {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

/* -- Between Sizes -- */
#mtf-sizing-dashboard .sz-between-note {
    background: rgba(255,90,31,0.08);
    border: 1px solid rgba(255,90,31,0.15);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #ff8c61 !important;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#mtf-sizing-dashboard .sz-between-note i { color: #ff5a1f; font-size: 16px; }

/* -- Breakdown Rows -- */
#mtf-sizing-dashboard .sz-breakdown-row {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 16px;
}
#mtf-sizing-dashboard .sz-breakdown-row:last-child { border-bottom: none; }
#mtf-sizing-dashboard .sz-bd-label { width: 100px; color: #888888 !important; font-size: 13px; font-weight: 500; }
#mtf-sizing-dashboard .sz-bd-value { width: 100px; color: #ffffff !important; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
#mtf-sizing-dashboard .sz-bd-range { color: #555 !important; font-size: 12px; flex: 1; }
#mtf-sizing-dashboard .sz-bd-cat { color: #888 !important; font-size: 12px; background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 6px; flex: 1; }
#mtf-sizing-dashboard .sz-bd-status {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
#mtf-sizing-dashboard .sz-match { background: rgba(74,222,128,0.15); color: #4ade80; }
#mtf-sizing-dashboard .sz-close { background: rgba(250,204,21,0.15); color: #facc15; }
#mtf-sizing-dashboard .sz-off { background: rgba(255,90,31,0.15); color: #ff5a1f; }

/* -- Quick Reference -- */
#mtf-sizing-dashboard .sz-ref-row {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 16px;
}
#mtf-sizing-dashboard .sz-ref-row:last-child { border-bottom: none; }
#mtf-sizing-dashboard .sz-ref-garment { flex: 1; color: #888 !important; font-size: 14px; display: flex; align-items: center; gap: 10px; }
#mtf-sizing-dashboard .sz-ref-garment i { color: #555; width: 20px; text-align: center; }
#mtf-sizing-dashboard .sz-ref-size { font-size: 20px; font-weight: 700; color: #ffffff !important; width: 70px; }
#mtf-sizing-dashboard .sz-ref-eu { font-size: 13px; color: #666 !important; width: 60px; }
#mtf-sizing-dashboard .sz-ref-conf { font-size: 13px; font-weight: 600; width: 50px; text-align: right; }

/* -- Body Shape -- */
#mtf-sizing-dashboard .sz-shape-grid { display: flex; flex-direction: column; gap: 20px; }
#mtf-sizing-dashboard .sz-shape-stats { display: flex; gap: 24px; flex-wrap: wrap; }
#mtf-sizing-dashboard .sz-shape-stat {
    flex: 1;
    min-width: 160px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
}
#mtf-sizing-dashboard .sz-shape-stat-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #666 !important; margin-bottom: 8px; }
#mtf-sizing-dashboard .sz-shape-stat-value { display: block; font-size: 22px; font-weight: 700; color: #ffffff !important; }
#mtf-sizing-dashboard .sz-shape-stat-desc { display: block; font-size: 13px; color: #888 !important; margin-top: 4px; }

/* -- Insights -- */
#mtf-sizing-dashboard .sz-insights { display: flex; flex-direction: column; gap: 10px; }
#mtf-sizing-dashboard .sz-insight {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}
#mtf-sizing-dashboard .sz-insight i { margin-top: 2px; flex-shrink: 0; }
#mtf-sizing-dashboard .sz-insight-info { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); color: #aaa !important; }
#mtf-sizing-dashboard .sz-insight-info i { color: #ff5a1f; }
#mtf-sizing-dashboard .sz-insight-positive { background: rgba(74,222,128,0.06); border: 1px solid rgba(74,222,128,0.12); color: #a3e635 !important; }
#mtf-sizing-dashboard .sz-insight-positive i { color: #4ade80; }

/* -- Empty State -- */
#mtf-sizing-dashboard .sz-empty { text-align: center; padding: 80px 20px; }
#mtf-sizing-dashboard .sz-empty h3 { font-size: 20px !important; margin-bottom: 8px !important; }

/* -- Sidebar glassmorphism -- */
body:has(#mtf-sizing-dashboard) .mtf-sidebar {
    background: linear-gradient(180deg, rgba(10,10,10,0.95) 0%, rgba(17,17,17,0.9) 100%) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.05);
}
body:has(#mtf-sizing-dashboard) .mtf-account-layout__sidebar { background: #050505 !important; }
body:has(#mtf-sizing-dashboard) .mtf-sidebar__link { color: #888888 !important; margin: 0 12px; padding: 14px 16px !important; border-radius: 10px; }
body:has(#mtf-sizing-dashboard) .mtf-sidebar__link:hover { color: #ffffff !important; background: rgba(255,255,255,0.05) !important; }
body:has(#mtf-sizing-dashboard) .mtf-sidebar__item.is-active .mtf-sidebar__link { background: rgba(255,90,31,0.12) !important; color: #ff5a1f !important; font-weight: 600; }
body:has(#mtf-sizing-dashboard) .mtf-sidebar__item.is-active .mtf-sidebar__icon { color: #ff5a1f !important; }
body:has(#mtf-sizing-dashboard) .mtf-sidebar__icon { color: #666666 !important; }
body:has(#mtf-sizing-dashboard) .mtf-sidebar__link:hover .mtf-sidebar__icon { color: #ffffff !important; }
body:has(#mtf-sizing-dashboard) .mtf-sidebar__text { font-family: 'Inter', sans-serif !important; font-size: 14px !important; }
body:has(#mtf-sizing-dashboard) .mtf-sidebar__logout .mtf-sidebar__link { border-top-color: rgba(255,255,255,0.06) !important; }

/* -- Responsive -- */
@media (max-width: 768px) {
    #mtf-sizing-dashboard { padding: 24px 16px !important; margin: -20px -20px !important; }
    #mtf-sizing-dashboard .sz-glass { padding: 20px; }
    #mtf-sizing-dashboard .sz-result-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    #mtf-sizing-dashboard .sz-result-confidence { text-align: left; min-width: auto; width: 100%; }
    #mtf-sizing-dashboard .sz-tabs { flex-wrap: wrap; width: 100%; }
    #mtf-sizing-dashboard .sz-fit-bar { flex-wrap: wrap; }
    #mtf-sizing-dashboard .sz-shape-stats { flex-direction: column; }
    #mtf-sizing-dashboard .sz-breakdown-row { flex-wrap: wrap; gap: 8px; }
    #mtf-sizing-dashboard .sz-bd-label { width: auto; }
    #mtf-sizing-dashboard .sz-bd-value { width: auto; }
}
