/**
 * Budget Builder marketing preview — compact demo below consulting savings (right rail).
 */

.aiea-marketing-rail__budget-preview {
    width: 100%;
    margin-top: 0.65rem;
}

body.aiea-app--live .advisor-fab--onboarding .aiea-marketing-rail__budget-preview {
    display: none;
}

.aiea-bb-preview-wrap {
    position: relative;
    width: 100%;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

.aiea-bb-preview-wrap * {
    pointer-events: none !important;
    cursor: default !important;
}

.aiea-bb-preview {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 0.9rem 0.78rem 1rem;
    border-radius: 18px;
    color: #0f2a44;
    background:
        radial-gradient(110% 70% at 100% 0%, rgba(99, 102, 241, 0.08), transparent 55%),
        radial-gradient(90% 60% at 0% 100%, rgba(16, 185, 129, 0.06), transparent 50%),
        linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
    border: 1px solid rgba(99, 102, 241, 0.16);
    box-shadow:
        0 4px 6px rgba(15, 42, 68, 0.04),
        0 14px 36px rgba(29, 79, 145, 0.1);
}

.aiea-bb-preview__field {
    position: relative;
    padding-top: 1.35rem !important;
}

.aiea-bb-preview__field-stamp {
    position: absolute;
    top: 0.28rem;
    left: 0.32rem;
    right: 0.32rem;
    z-index: 2;
    display: block;
    font-size: clamp(0.58rem, 1.35vw, 0.68rem);
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    color: #7c3aed;
}

.aiea-bb-preview__overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    pointer-events: none;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.aiea-bb-preview__watermark {
    font-size: clamp(2.1rem, 9vw, 3.2rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(15, 42, 68, 0.14);
    transform: rotate(-16deg);
    padding: 0.14em 0.5em;
    border: 3px solid rgba(15, 42, 68, 0.11);
    border-radius: 10px;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.aiea-bb-preview__overlay-hint {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(100, 116, 139, 0.85);
    transform: rotate(-16deg);
    margin-top: -0.15rem;
}

.aiea-bb-preview__header {
    margin-bottom: 0.8rem;
}

.aiea-bb-preview__header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    margin-bottom: 0.32rem;
}

.aiea-bb-preview__example-badge {
    flex: 0 0 auto;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.aiea-bb-preview__example-badge--header {
    white-space: nowrap;
}

.aiea-bb-preview__eyebrow {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7c3aed;
}

.aiea-bb-preview__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
}

.aiea-bb-preview__title {
    margin: 0;
    font-size: clamp(1.08rem, 2.6vw, 1.32rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0f2a44;
}

.aiea-bb-preview__title-note {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(0.78rem, 1.9vw, 0.92rem);
    font-weight: 800;
    line-height: 1.25;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.aiea-bb-preview__subtitle {
    margin: 0.3rem 0 0;
    font-size: clamp(0.88rem, 2vw, 1rem);
    line-height: 1.35;
    color: #64748b;
}

.aiea-bb-preview__kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.aiea-bb-preview__kpi {
    padding: 1.35rem 0.55rem 0.55rem 1.95rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(15, 42, 68, 0.08);
    min-height: 72px;
}

.aiea-bb-preview__kpi-icon {
    position: absolute;
    left: 0.5rem;
    top: 1.45rem;
    font-size: 1rem;
    line-height: 1;
}

.aiea-bb-preview__kpi-label {
    margin: 0;
    font-size: clamp(0.76rem, 1.85vw, 0.88rem);
    line-height: 1.28;
    color: #64748b;
    font-weight: 600;
}

.aiea-bb-preview__kpi-value {
    margin: 0.18rem 0 0;
    font-size: clamp(1rem, 2.4vw, 1.18rem);
    font-weight: 800;
    line-height: 1.15;
    color: #0f2a44;
}

.aiea-bb-preview__kpi--benefit .aiea-bb-preview__kpi-value { color: #059669; }
.aiea-bb-preview__kpi--roi .aiea-bb-preview__kpi-value { color: #2563eb; }

.aiea-bb-preview__section {
    margin-bottom: 0.75rem;
}

.aiea-bb-preview__section-title {
    margin: 0 0 0.45rem;
    font-size: clamp(0.92rem, 2.1vw, 1.05rem);
    font-weight: 800;
    color: #1d4f91;
}

.aiea-bb-preview__scenarios {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

.aiea-bb-preview__scenario {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 1.35rem 0.35rem 0.5rem;
    border: 1px solid rgba(15, 42, 68, 0.12);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    min-height: 58px;
}

.aiea-bb-preview__scenario.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
}

.aiea-bb-preview__scenario-badge {
    display: block;
    margin-bottom: 0.18rem;
    font-size: clamp(0.62rem, 1.5vw, 0.72rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2563eb;
}

.aiea-bb-preview__scenario-name {
    font-size: clamp(0.84rem, 2vw, 0.96rem);
    font-weight: 800;
    line-height: 1.22;
    color: #0f2a44;
}

.aiea-bb-preview__scenario-meta {
    margin-top: 0.16rem;
    font-size: clamp(0.78rem, 1.85vw, 0.9rem);
    line-height: 1.25;
    color: #64748b;
    font-weight: 700;
}

.aiea-bb-preview__budget-row {
    display: flex;
    gap: 0.45rem;
    align-items: stretch;
    margin-bottom: 0.5rem;
    padding-top: 1.45rem !important;
}

.aiea-bb-preview__budget-input-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.55rem;
    min-height: 48px;
    border-radius: 10px;
    border: 1px solid rgba(15, 42, 68, 0.14);
    background: #fff;
}

.aiea-bb-preview__budget-currency {
    font-size: clamp(0.92rem, 2.1vw, 1.05rem);
    font-weight: 800;
    color: #64748b;
}

.aiea-bb-preview__budget-value {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    font-size: clamp(1.08rem, 2.5vw, 1.25rem);
    font-weight: 700;
    color: #0f2a44;
}

.aiea-bb-preview__optimize-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 0 0.7rem;
    min-height: 48px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d4f91 0%, #2563eb 100%);
    color: #fff;
    font-size: clamp(0.82rem, 1.9vw, 0.94rem);
    font-weight: 800;
    white-space: nowrap;
    opacity: 0.72;
}

.aiea-bb-preview__recommendation {
    padding: 1.45rem 0.65rem 0.65rem;
    border-radius: 10px;
    background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.aiea-bb-preview__recommendation-title {
    margin: 0 0 0.28rem;
    font-size: clamp(0.86rem, 2vw, 0.98rem);
    font-weight: 800;
    color: #065f46;
}

.aiea-bb-preview__recommendation-body {
    margin: 0;
    font-size: clamp(0.82rem, 1.95vw, 0.94rem);
    line-height: 1.42;
    color: #047857;
}

.aiea-bb-preview__recommendation-success {
    margin: 0.32rem 0 0;
    font-size: clamp(0.82rem, 1.95vw, 0.94rem);
    font-weight: 800;
    color: #059669;
}

.aiea-bb-preview__projects {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.aiea-bb-preview__project {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.38rem;
    padding: 1.4rem 0.45rem 0.42rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(15, 42, 68, 0.08);
    font-size: clamp(0.84rem, 2vw, 0.96rem);
    opacity: 0.55;
}

.aiea-bb-preview__project.is-included {
    opacity: 1;
}

.aiea-bb-preview__project-toggle {
    width: 26px;
    height: 14px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    flex-shrink: 0;
}

.aiea-bb-preview__project-toggle::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
}

.aiea-bb-preview__project-toggle.is-on {
    background: #2563eb;
}

.aiea-bb-preview__project-toggle.is-on::after {
    transform: translateX(12px);
}

.aiea-bb-preview__project-name {
    font-weight: 700;
    color: #0f2a44;
    line-height: 1.25;
}

.aiea-bb-preview__project-cat {
    font-size: clamp(0.72rem, 1.7vw, 0.82rem);
    font-weight: 700;
    padding: 0.14rem 0.34rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
}

.aiea-bb-preview__project-check {
    color: #059669;
    font-weight: 800;
    font-size: 0.88rem;
}

.aiea-bb-preview__charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.48rem;
    margin: 0.65rem 0;
}

.aiea-bb-preview__chart-card {
    padding: 1.4rem 0.45rem 0.45rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(15, 42, 68, 0.08);
    text-align: center;
}

.aiea-bb-preview__chart-title {
    margin: 0 0 0.28rem;
    font-size: clamp(0.76rem, 1.8vw, 0.88rem);
    font-weight: 800;
    color: #64748b;
}

.aiea-bb-preview__donut {
    display: block;
    width: 100%;
    max-width: 110px;
    height: auto;
    margin: 0 auto;
}

.aiea-bb-preview__bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.16rem;
    min-height: 88px;
    padding-top: 0.22rem;
}

.aiea-bb-preview__bar-group {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
    min-width: 0;
}

.aiea-bb-preview__bar {
    width: 100%;
    max-width: 18px;
    border-radius: 3px 3px 0 0;
}

.aiea-bb-preview__bar--invest { background: #3b82f6; }
.aiea-bb-preview__bar--benefit { background: #10b981; }

.aiea-bb-preview__bar-label {
    font-size: clamp(0.68rem, 1.6vw, 0.78rem);
    color: #94a3b8;
    margin-top: 0.14rem;
    font-weight: 700;
}

.aiea-bb-preview__value-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.aiea-bb-preview__value-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.45rem;
    padding: 1.4rem 0.48rem 0.42rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(15, 42, 68, 0.06);
    font-size: clamp(0.82rem, 1.95vw, 0.94rem);
    color: #64748b;
}

.aiea-bb-preview__value-list strong {
    font-size: clamp(0.9rem, 2.1vw, 1.02rem);
    color: #0f2a44;
    text-align: right;
    font-weight: 800;
}

.aiea-bb-preview__footnote {
    margin: 0.6rem 0 0;
    font-size: clamp(0.78rem, 1.85vw, 0.88rem);
    line-height: 1.4;
    text-align: center;
    color: #94a3b8;
}

@media (max-width: 1023px) {
    .aiea-marketing-rail__budget-preview {
        margin-top: 0.75rem;
    }

    .aiea-bb-preview {
        padding: 1rem 0.88rem 1.1rem;
    }

    .aiea-bb-preview__kpi-value {
        font-size: 1.12rem;
    }

    .aiea-bb-preview__field-stamp {
        font-size: 0.66rem;
    }
}
