/**
 * X-DMAIC Strategy Check Modal Styles
 * Strictly follows X-DMAIC B2B Engineering Design System:
 * - Glassmorphism, Theme Variables (Dark/Light Mode), Alt-Font Typography
 * - Desktop: Centered dialog modal (max-width 560px)
 * - Mobile: Bottom drawer sheet (slides from bottom, max-height 90vh/40vh for promo)
 * - A11y & Focus outlines, 44x44px touch targets
 */

:root {
    --sm-modal-z: 999999;
}

/* Modal Overlay */
.sm-sc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--sm-modal-z);
    background: rgba(10, 15, 29, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-sc-overlay.sm-sc-active {
    display: flex;
    opacity: 1;
}

/* Desktop Dialog Box */
.sm-sc-dialog {
    background: #18191c;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    width: 92%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 36px 32px 32px;
    transform: scale(0.96) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f1f5f9;
}

.sm-sc-overlay.sm-sc-active .sm-sc-dialog {
    transform: scale(1) translateY(0);
}

/* Light Theme Overrides */
html[data-theme="light"] .sm-sc-dialog {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
    color: #0f172a;
}

/* Close Button (min 44x44px touch area) */
.sm-sc-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.sm-sc-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

html[data-theme="light"] .sm-sc-close-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

/* Screen Management */
.sm-sc-screen {
    display: none;
    animation: smScFadeIn 0.25s ease-out;
}

.sm-sc-screen.active {
    display: block;
}

@keyframes smScFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Screen 1: Invite - dải xanh thương hiệu + mascot (đồng bộ khối CTA cuối bài) */
.sm-sc-invite-hero {
    position: relative;
    height: 168px;
    margin: -36px -32px 26px;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 78%, rgba(190, 255, 1, 0.32) 0, rgba(190, 255, 1, 0) 36%),
        radial-gradient(rgba(255, 255, 255, 0.13) 1.2px, transparent 1.4px) 0 0 / 18px 18px,
        linear-gradient(135deg, #0038a8 0%, #005eff 58%, #3d8cff 100%);
}
.sm-sc-invite-kicker {
    position: absolute; top: 20px; left: 24px;
    padding: 4px 12px; border-radius: 999px;
    background: #beff01; color: #0b1a3a;
    font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}
.sm-sc-invite-mascot {
    position: absolute; left: 50%; bottom: -6px;
    width: auto; height: 152px; transform: translateX(-50%);
    filter: drop-shadow(0 10px 14px rgba(0, 20, 70, 0.4));
    animation: smScMascotIn .5s cubic-bezier(.2, .9, .3, 1.2) both .1s;
}
@keyframes smScMascotIn { from { opacity: 0; transform: translate(-50%, 24px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sm-sc-dialog:has(#sm-sc-s1.active) .sm-sc-close-btn { color: #fff; }
.sm-sc-dialog:has(#sm-sc-s1.active) .sm-sc-close-btn:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }
#sm-sc-s1 .sm-sc-title { text-wrap: balance; font-size: 24px; }
#sm-sc-s1 .sm-sc-desc { font-size: 15px; margin-bottom: 14px; text-wrap: balance; }
.sm-sc-invite-perks { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 24px; padding: 0; list-style: none; }
.sm-sc-invite-perks li { position: relative; padding-left: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.sm-sc-invite-perks li::before {
    content: ''; position: absolute; left: 2px; top: 50%; margin-top: -6px; width: 10px; height: 6px;
    border-left: 2px solid #005eff; border-bottom: 2px solid #005eff; transform: rotate(-45deg);
}
html[data-theme="dark"] .sm-sc-invite-perks li::before { border-color: #beff01; }
#sm-sc-s1 .sm-sc-btn-primary { background-color: #005eff !important; font-size: 15px; padding: 14px 24px; }
#sm-sc-s1 .sm-sc-btn-primary:hover { background-color: #1a78ff !important; }
@media (max-width: 767px) {
    .sm-sc-invite-hero { margin: -32px -20px 22px; height: 150px; border-radius: 19px 19px 0 0; }
    .sm-sc-dialog:has(#sm-sc-s1.active) .sm-sc-drag-handle { position: relative; z-index: 2; background: rgba(255, 255, 255, 0.6); }
    .sm-sc-invite-mascot { height: 136px; }
    #sm-sc-s1 .sm-sc-title { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .sm-sc-invite-mascot { animation: none; } }

/* Screen 1: Invite */
.sm-sc-funnel-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(0, 102, 255, 0.12);
    border: 1px solid rgba(0, 102, 255, 0.25);
    color: var(--accent-primary, #0066ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px auto;
}

.sm-sc-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    text-align: center;
}

.sm-sc-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 28px;
}

html[data-theme="light"] .sm-sc-desc {
    color: #475569;
}

.sm-sc-btn-primary {
    background-color: var(--accent-primary, #0066ff) !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 24px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
    text-decoration: none;
}

.sm-sc-btn-primary:hover {
    background-color: #0052cc !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
    color: #ffffff !important;
}

.sm-sc-btn-decline {
    display: block;
    width: 100%;
    text-align: center;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    margin-top: 14px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.sm-sc-btn-decline:hover {
    color: #94a3b8;
    text-decoration: underline;
}

html[data-theme="light"] .sm-sc-btn-decline:hover {
    color: #1e293b;
}

/* Screen 2: Quiz */
.sm-sc-quiz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .sm-sc-quiz-header {
    border-color: rgba(0, 0, 0, 0.06);
}

.sm-sc-back-step-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.sm-sc-back-step-btn:hover {
    color: #ffffff;
}

html[data-theme="light"] .sm-sc-back-step-btn:hover {
    color: #0f172a;
}

.sm-sc-step-counter {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-primary, #0066ff);
}

.sm-sc-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 24px;
}

html[data-theme="light"] .sm-sc-progress-bar {
    background: rgba(0, 0, 0, 0.06);
}

.sm-sc-progress-fill {
    height: 100%;
    background: var(--accent-primary, #0066ff);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-sc-question-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.sm-sc-question-hint {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
    line-height: 1.5;
    font-style: italic;
}

html[data-theme="light"] .sm-sc-question-hint {
    color: #64748b;
}

.sm-sc-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sm-sc-option-btn {
    width: 100%;
    text-align: left;
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

html[data-theme="light"] .sm-sc-option-btn {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.sm-sc-option-btn:hover {
    background: rgba(0, 102, 255, 0.08);
    border-color: var(--accent-primary, #0066ff);
    color: #38bdf8;
    transform: translateX(4px);
}

html[data-theme="light"] .sm-sc-option-btn:hover {
    background: #eff6ff;
    border-color: var(--accent-primary, #0066ff);
    color: #0066ff;
}

/* Screen 3: Quick Result */
.sm-sc-badge-result {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    white-space: nowrap;
}

.sm-sc-badge-ready {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.sm-sc-badge-focus {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.sm-sc-badge-fix_root {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

html[data-theme="light"] .sm-sc-badge-ready {
    color: #059669 !important;
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
}

html[data-theme="light"] .sm-sc-badge-focus {
    color: #d97706 !important;
    background: #fffbeb !important;
    border-color: #fde68a !important;
}

html[data-theme="light"] .sm-sc-badge-fix_root {
    color: #dc2626 !important;
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}

.sm-sc-summary-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
}

html[data-theme="light"] .sm-sc-summary-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.sm-sc-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sm-sc-summary-item:last-child {
    border-bottom: none;
}

html[data-theme="light"] .sm-sc-summary-item {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.sm-sc-summary-topic {
    color: #e2e8f0;
    font-weight: 500;
}

html[data-theme="light"] .sm-sc-summary-topic {
    color: #334155;
}

.sm-sc-summary-mark {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
}

.sm-sc-icon-clear { color: #4ade80; font-weight: 700; }
.sm-sc-icon-unsure { color: #facc15; font-weight: 700; }
.sm-sc-icon-issue { color: #f87171; font-weight: 700; }

.sm-sc-first-step-box {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}

html[data-theme="light"] .sm-sc-first-step-box {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.sm-sc-first-step-title {
    font-size: 13px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 6px;
}

html[data-theme="light"] .sm-sc-first-step-title {
    color: #0f172a;
}

.sm-sc-first-step-desc {
    font-size: 14px;
    line-height: 1.5;
    color: #cbd5e1;
}

html[data-theme="light"] .sm-sc-first-step-desc {
    color: #475569;
}

.sm-sc-form-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 18px;
}

html[data-theme="light"] .sm-sc-form-section {
    border-top-color: #e2e8f0;
}

.sm-sc-form-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    color: #e2e8f0;
}

html[data-theme="light"] .sm-sc-form-title {
    color: #1e293b;
}

.sm-sc-input-group {
    margin-bottom: 12px;
}

/* Bẫy bot */
.sm-sc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.sm-sc-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1 !important;
}
html[data-theme="light"] .sm-sc-label { color: #334155 !important; -webkit-text-fill-color: #334155 !important; }
.sm-sc-optional { font-weight: 400; color: #64748b !important; -webkit-text-fill-color: #64748b !important; }
.sm-sc-optional[hidden], .sm-sc-input-group[hidden] { display: none !important; }

/* Chọn kênh nhận kết quả: Email / Zalo */
.sm-sc-channel {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.sm-sc-channel-label {
    font-size: 13px;
    font-weight: 600;
    margin-right: 4px;
    color: #cbd5e1 !important;
    -webkit-text-fill-color: #cbd5e1 !important;
}
html[data-theme="light"] .sm-sc-channel-label { color: #334155 !important; -webkit-text-fill-color: #334155 !important; }
.sm-sc-channel-opt { flex: 1; margin: 0; cursor: pointer; }
.sm-sc-channel-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sm-sc-channel-opt span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    transition: all 0.2s ease;
}
html[data-theme="light"] .sm-sc-channel-opt span { border-color: #cbd5e1; color: #475569 !important; -webkit-text-fill-color: #475569 !important; }
.sm-sc-channel-opt input:checked + span {
    border-color: var(--accent-primary, #0066ff);
    background: rgba(0, 102, 255, 0.14);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
html[data-theme="light"] .sm-sc-channel-opt input:checked + span { background: #eef4ff; color: #0047c9 !important; -webkit-text-fill-color: #0047c9 !important; }
.sm-sc-channel-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.35); }

.sm-sc-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

html[data-theme="light"] .sm-sc-input {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

.sm-sc-input:focus {
    border-color: var(--accent-primary, #0066ff);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .sm-sc-input:focus {
    background: #ffffff;
}

.sm-sc-input.is-invalid { border-color: #f87171; }
.sm-sc-input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2); }

.sm-sc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.45;
    margin-bottom: 16px;
    cursor: pointer;
}

html[data-theme="light"] .sm-sc-checkbox-label {
    color: #64748b;
}

/* Theme đặt width 100% cho mọi input: trả ô tick về kích thước thật để không đẩy chữ sang phải */
.sm-sc-checkbox-label input[type="checkbox"] {
    flex: none;
    width: 16px !important;
    height: 16px;
    margin: 1px 0 0;
    padding: 0;
    accent-color: var(--accent-primary, #0066ff);
    cursor: pointer;
}

.sm-sc-consent {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
}
html[data-theme="light"] .sm-sc-consent { color: #64748b !important; -webkit-text-fill-color: #64748b !important; }
.sm-sc-consent a { color: var(--accent-primary, #0066ff) !important; -webkit-text-fill-color: var(--accent-primary, #0066ff) !important; text-decoration: underline; }

.sm-sc-form-error {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    font-size: 13px;
    color: #fca5a5 !important;
    -webkit-text-fill-color: #fca5a5 !important;
}
html[data-theme="light"] .sm-sc-form-error { background: #fef2f2; color: #b91c1c !important; -webkit-text-fill-color: #b91c1c !important; }
.sm-sc-form-error[hidden] { display: none; }

.sm-sc-btn-view-web { font-size: 13px; color: #60a5fa; text-decoration: underline; }
html[data-theme="light"] .sm-sc-btn-view-web { color: #2563eb; }

.sm-sc-checkbox-label a {
    color: var(--accent-primary, #0066ff);
    text-decoration: underline;
}

.sm-sc-btn-glow {
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4);
}

.sm-sc-btn-glow:hover {
    box-shadow: 0 6px 25px rgba(0, 102, 255, 0.5);
}

.sm-sc-alt-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.sm-sc-alt-divider {
    color: #475569;
    font-size: 12px;
}

.sm-sc-web-direct-link {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: underline;
    transition: color 0.2s;
}

.sm-sc-web-direct-link:hover {
    color: #cbd5e1;
}

html[data-theme="light"] .sm-sc-web-direct-link {
    color: #64748b;
}

html[data-theme="light"] .sm-sc-web-direct-link:hover {
    color: #475569;
}

.sm-sc-booking-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary, #0066ff);
    text-decoration: none;
    margin-top: 0;
}

.sm-sc-booking-link:hover {
    text-decoration: underline;
}

#sm-sc-result-headline {
    font-size: 20px;
    margin-bottom: 16px;
    line-height: 1.3;
}

/* Screen 4: Thank You */
.sm-sc-success-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px auto;
}

.sm-sc-action-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.sm-sc-btn-zalo {
    background: #0068ff !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    border: none;
    cursor: pointer;
}

.sm-sc-btn-booking {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1.2;
    border: none;
    cursor: pointer;
}

.sm-sc-error-msg {
    color: #f87171;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

/* Mobile Bottom Drawer Behavior (max height <= 40% screen for promo or smooth sheet) */
@media (max-width: 767px) {
    .sm-sc-overlay {
        align-items: flex-end;
    }
    .sm-sc-dialog {
        width: 100%;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        margin: 0;
        max-height: 85vh;
        padding: 28px 20px 24px;
        transform: translateY(100%);
        border-bottom: none;
    }
    .sm-sc-overlay.sm-sc-active .sm-sc-dialog {
        transform: translateY(0);
    }
    .sm-sc-drag-handle {
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
        margin: -16px auto 16px auto;
        display: block;
    }
    html[data-theme="light"] .sm-sc-drag-handle {
        background: rgba(0, 0, 0, 0.15);
    }
    .sm-sc-action-row {
        flex-direction: column;
    }
}

/* ==========================================================================
   STATIC CTA WIDGET (Single Blog Bottom Entry)
   ========================================================================== */
.sm-sc-static-widget {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 270px;
    align-items: end;
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 70%, rgba(190, 255, 1, 0.26) 0, rgba(190, 255, 1, 0) 32%),
        radial-gradient(rgba(255, 255, 255, 0.12) 1.2px, transparent 1.4px) 0 0 / 18px 18px,
        linear-gradient(135deg, #0038a8 0%, #005eff 58%, #3d8cff 100%);
    box-shadow: 0 22px 44px -18px rgba(0, 60, 180, 0.55);
}
.sm-sc-widget-body { padding: 34px 0 34px 36px; }
.sm-sc-widget-kicker {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 999px;
    background: #beff01; color: #0b1a3a;
    font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}
.sm-sc-static-widget .sm-sc-widget-title {
    margin: 14px 0 10px; color: #fff !important;
    font-size: clamp(22px, 1vw + 16px, 28px); line-height: 1.25; font-weight: 700; letter-spacing: -0.01em;
    text-wrap: balance;
}
.sm-sc-static-widget .sm-sc-widget-desc {
    margin: 0 0 22px; max-width: 640px;
    color: rgba(255, 255, 255, 0.86) !important; font-size: 16px; line-height: 1.6;
}
.sm-sc-widget-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; }
.sm-sc-widget-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 24px; border: 0; border-radius: 999px;
    background: #fff; color: #005eff; font-size: 15px; font-weight: 700;
    box-shadow: 0 10px 20px -8px rgba(0, 20, 70, 0.45);
    transition: transform .2s, box-shadow .2s;
}
.sm-sc-widget-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 26px -8px rgba(0, 20, 70, 0.55); }
.sm-sc-widget-btn i { transition: transform .2s; }
.sm-sc-widget-btn:hover i { transform: translateX(3px); }
.sm-sc-widget-btn:focus-visible { outline: 3px solid #beff01; outline-offset: 3px; }
.sm-sc-widget-perks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.sm-sc-widget-perks li { position: relative; padding-left: 20px; font-size: 14px; color: #fff; white-space: nowrap; }
.sm-sc-widget-perks li::before {
    content: ''; position: absolute; left: 2px; top: 50%; margin-top: -6px; width: 10px; height: 6px;
    border-left: 2px solid #beff01; border-bottom: 2px solid #beff01; transform: rotate(-45deg);
}
.sm-sc-widget-mascot {
    align-self: end; width: 270px; height: auto; margin: -84px 0 0 -24px;
    filter: drop-shadow(0 14px 18px rgba(0, 20, 70, 0.4));
    transition: transform .3s; transform-origin: bottom center;
}
.sm-sc-static-widget:hover .sm-sc-widget-mascot { transform: rotate(-3deg) scale(1.03); }
@media (max-width: 767px) {
    .sm-sc-static-widget { grid-template-columns: 1fr; }
    .sm-sc-widget-body { padding: 26px 22px 24px; }
    .sm-sc-widget-mascot { position: absolute; top: -46px; right: 10px; width: 108px; margin: 0; }
    .sm-sc-static-widget .sm-sc-widget-title { padding-right: 70px; }
}
@media (prefers-reduced-motion: reduce) { .sm-sc-widget-btn, .sm-sc-widget-btn i, .sm-sc-widget-mascot { transition: none; } }

/* ==========================================================================
   DYNAMIC STRATEGY RESULT PAGE STYLES
   ========================================================================== */
.sm-sc-result-page {
    min-height: 80vh;
    margin-top: 100px; /* Fallback safe top space for sticky header before JS calculates exact height */
    padding-bottom: 90px; /* Generous bottom space before footer */
}

@media (max-width: 991px) {
    .sm-sc-result-page {
        margin-top: 80px;
        padding-bottom: 60px;
    }
}

/* Hero Banner Scenarios */
.sm-sc-hero-banner {
    border-left: 5px solid #2563eb;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 5px;
}

html[data-theme="light"] .sm-sc-hero-banner {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.sm-sc-hero-banner.sm-sc-badge-ready {
    border-left-color: #10b981;
}

.sm-sc-hero-banner.sm-sc-badge-focus {
    border-left-color: #f59e0b;
}

.sm-sc-hero-banner.sm-sc-badge-fix-root {
    border-left-color: #ef4444;
}

.sm-sc-badge-tag {
    padding: 6px 14px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.3;
    letter-spacing: 0.4px;
}

.sm-sc-badge-ready .sm-sc-badge-tag {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

.sm-sc-badge-focus .sm-sc-badge-tag {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

.sm-sc-badge-fix-root .sm-sc-badge-tag {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #dc2626 !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

.sm-sc-hero-counts {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sm-sc-score-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .sm-sc-score-card {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.sm-sc-score-num {
    color: #2563eb;
}

.sm-sc-badge-ready .sm-sc-score-num {
    color: #10b981;
}

.sm-sc-badge-focus .sm-sc-score-num {
    color: #f59e0b;
}

.sm-sc-badge-fix-root .sm-sc-score-num {
    color: #ef4444;
}

.sm-sc-progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

html[data-theme="light"] .sm-sc-progress-track {
    background: #e2e8f0;
}

.sm-sc-progress-fill-bar {
    height: 100%;
    border-radius: 4px;
    background: #2563eb;
    transition: width 0.4s ease;
}

.sm-sc-badge-ready .sm-sc-progress-fill-bar {
    background: #10b981;
}

.sm-sc-badge-focus .sm-sc-progress-fill-bar {
    background: #f59e0b;
}

.sm-sc-badge-fix-root .sm-sc-progress-fill-bar {
    background: #ef4444;
}

/* Notice Banner */
.sm-sc-notice-banner {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-left: 4px solid #f59e0b;
}

/* Topic Cards */
.sm-sc-topic-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sm-sc-topic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .sm-sc-topic-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.sm-sc-topic-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

html[data-theme="light"] .sm-sc-topic-num {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

/* Status Pills (Cards & Legend) */
.sm-sc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.2px;
    transition: all 0.2s ease;
}

.sm-sc-status-pill i {
    font-size: 12px;
    line-height: 1;
}

.sm-sc-status-pill.status-clear {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

html[data-theme="light"] .sm-sc-status-pill.status-clear {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.sm-sc-status-pill.status-uncertain {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

html[data-theme="light"] .sm-sc-status-pill.status-uncertain {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}

.sm-sc-status-pill.status-issue {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

html[data-theme="light"] .sm-sc-status-pill.status-issue {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* Kicker Badge */
.sm-sc-kicker-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

html[data-theme="light"] .sm-sc-kicker-badge {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

/* Code Badge */
.sm-sc-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .sm-sc-code-badge {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

.sm-sc-code-badge strong {
    font-family: monospace;
    font-weight: 700;
    color: var(--base-color, #2563eb);
}

.sm-sc-topic-card.status-issue {
    border-left: 4px solid #ef4444;
}

.sm-sc-topic-card.status-uncertain {
    border-left: 4px solid #f59e0b;
}

.sm-sc-topic-card.status-clear {
    border-left: 4px solid #10b981;
}

.sm-sc-advice-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .sm-sc-advice-box {
    background: #f8fafc;
    border-color: #edf2f7;
}

/* Status dots */
.badge-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 3px;
    vertical-align: middle;
}

.badge-status-dot.issue {
    background-color: #ef4444;
}

.badge-status-dot.uncertain {
    background-color: #f59e0b;
}

.badge-status-dot.clear {
    background-color: #10b981;
}

/* Consult CTA Box */
.sm-sc-consult-cta {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

html[data-theme="light"] .sm-sc-consult-cta {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, #ffffff 100%);
    border-color: rgba(37, 99, 235, 0.15);
}

/* Zalo Action Button */
.sm-sc-btn-zalo-action {
    background: rgba(0, 104, 255, 0.08) !important;
    color: #0068ff !important;
    border: 1px solid rgba(0, 104, 255, 0.3) !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    text-decoration: none;
}

.sm-sc-btn-zalo-action:hover {
    background: #0068ff !important;
    color: #ffffff !important;
    border-color: #0068ff !important;
    box-shadow: 0 4px 15px rgba(0, 104, 255, 0.3);
    transform: translateY(-1px);
}

html[data-theme="light"] .sm-sc-btn-zalo-action {
    background: #f0f7ff !important;
    color: #0068ff !important;
    border-color: #bfdbfe !important;
}

html[data-theme="light"] .sm-sc-btn-zalo-action:hover {
    background: #0068ff !important;
    color: #ffffff !important;
}

/* Security Badge Box */
.sm-sc-security-badge-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

html[data-theme="light"] .sm-sc-security-badge-box {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.sm-sc-security-icon-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html[data-theme="light"] .sm-sc-security-icon-circle {
    background: #eff6ff;
}

/* Footer Link Badges */
.sm-sc-footer-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
}

.sm-sc-footer-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

html[data-theme="light"] .sm-sc-footer-link {
    color: #475569;
    background: #f8fafc;
    border-color: #e2e8f0;
}

html[data-theme="light"] .sm-sc-footer-link:hover {
    color: #0f172a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.sm-sc-footer-separator {
    color: #64748b;
    font-size: 12px;
    margin: 0 4px;
}

/* ==========================================================================
   PRINT STYLES (@media print)
   ========================================================================== */
@media print {
    header,
    footer,
    nav,
    .d-print-none,
    .sm-sc-overlay,
    #sm-reading-progress,
    #xd-growth-chat-overlay,
    .sticky-wrap,
    .scroll-top-wrapper {
        display: none !important;
    }

    body,
    .sm-sc-result-page {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 12pt;
    }

    .glass-panel {
        background: #ffffff !important;
        border: 1px solid #cccccc !important;
        box-shadow: none !important;
    }

    .text-dark-gray,
    .text-medium-gray {
        color: #000000 !important;
    }

    .sm-sc-topic-card {
        page-break-inside: avoid;
        margin-bottom: 15px !important;
        border: 1px solid #dddddd !important;
    }

    .sm-sc-advice-box {
        background: #f9f9f9 !important;
        border: 1px solid #eeeeee !important;
    }

    .sm-sc-hero-banner {
        border: 2px solid #333333 !important;
    }
}


/* Màn kết quả + form gọn để vừa một màn hình (trước đây ~1185px, phải cuộn trong modal) */
#sm-sc-s3 .sm-sc-badge-result { margin-bottom: 8px; padding: 0 12px; height: 26px; line-height: 1; font-size: 11px; }
#sm-sc-s3 #sm-sc-result-headline { font-size: 18px; margin-bottom: 12px; text-wrap: balance; }
#sm-sc-s3 .sm-sc-summary-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    padding: 4px 14px;
    margin-bottom: 12px;
}
#sm-sc-s3 .sm-sc-summary-item { padding: 7px 0; margin: 0; font-size: 13px; line-height: 1.35; gap: 8px; }
#sm-sc-s3 .sm-sc-summary-mark { font-size: 12px; white-space: nowrap; }
#sm-sc-s3 .sm-sc-first-step-box { padding: 10px 14px; margin-bottom: 14px; }
#sm-sc-s3 .sm-sc-first-step-title { margin-bottom: 2px; }
#sm-sc-s3 .sm-sc-first-step-desc { font-size: 13.5px; margin: 0; }
#sm-sc-s3 .sm-sc-form-section { padding-top: 14px; }
#sm-sc-s3 .sm-sc-form-title { margin-bottom: 10px; }
#sm-sc-s3 .sm-sc-channel { margin-bottom: 10px; }
#sm-sc-s3 .sm-sc-channel-opt span { height: 38px; padding: 0 10px; line-height: 1; }
.sm-sc-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
.sm-sc-fields .sm-sc-input-group:last-child:nth-child(odd) { grid-column: 1 / -1; }
#sm-sc-s3 .sm-sc-input-group { margin-bottom: 10px; min-width: 0; }
#sm-sc-s3 .sm-sc-label { margin-bottom: 4px; font-size: 12.5px; }
#sm-sc-s3 .sm-sc-input { height: 42px !important; min-height: 0 !important; padding: 0 14px !important; margin: 0; line-height: 40px; }
#sm-sc-s3 .sm-sc-checkbox-label { margin: 2px 0 12px; }
#sm-sc-s3 .sm-sc-btn-primary { height: 46px; padding: 0 24px; }
#sm-sc-s3 .sm-sc-consent { margin-top: 8px; }
#sm-sc-s3 .sm-sc-alt-actions { margin-top: 10px; }
.sm-sc-dialog:has(#sm-sc-s3.active) { padding-top: 24px; padding-bottom: 22px; }
/* Mobile: tóm tắt 2 cột, trạng thái chỉ hiện icon màu (chữ vẫn có trong DOM cho trình đọc màn hình) */
@media (max-width: 575px) {
    #sm-sc-s3 .sm-sc-summary-card { column-gap: 14px; padding: 2px 12px; }
    #sm-sc-s3 .sm-sc-summary-item { padding: 6px 0; font-size: 12.5px; }
    #sm-sc-s3 .sm-sc-summary-mark { font-size: 0; }
    #sm-sc-s3 .sm-sc-summary-mark i { font-size: 13px; }
    #sm-sc-s3 #sm-sc-result-headline { font-size: 17px; margin-bottom: 10px; }
    #sm-sc-s3 .sm-sc-first-step-box { padding: 8px 12px; margin-bottom: 12px; }
    #sm-sc-s3 .sm-sc-first-step-desc { font-size: 13px; line-height: 1.45; }
    #sm-sc-s3 .sm-sc-form-title { font-size: 13.5px; }
}
#sm-sc-s3 .sm-sc-error-msg { margin: 4px 0 0; font-size: 12px; line-height: 1.4; }
