/* Demo Balcony.IA na tela de login — escopo .balcony-ia-hero */

@media (min-width: 992px) {
    .auth-fluid .auth-fluid-right.balcony-ia-panel {
        position: relative;
        isolation: isolate;
        display: flex;
        align-items: stretch;
        padding: 0;
        overflow: hidden;
        background: transparent;
    }

    .auth-fluid .auth-fluid-right.balcony-ia-panel::before {
        content: "";
        position: absolute;
        inset: -24px;
        z-index: 0;
        background: url("/assets/images/bg-auth.jpg") center center / cover no-repeat;
        filter: blur(10px);
        transform: scale(1.06);
    }

    .auth-fluid .auth-fluid-right.balcony-ia-panel::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(
            165deg,
            rgba(11, 18, 48, 0.72) 0%,
            rgba(16, 26, 60, 0.58) 45%,
            rgba(15, 23, 51, 0.68) 100%
        );
    }
}

.balcony-ia-hero {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
    margin: 0 auto;
    padding: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px);
    text-align: center;
}

.balcony-ia-copy {
    width: min(100%, 560px);
    margin: 0 auto clamp(22px, 3.2vw, 36px);
}

.balcony-ia-title {
    margin: 0;
    font-size: clamp(1.65rem, 3.2vw, 2.65rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: #fff;
    text-wrap: balance;
    text-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
}

.balcony-ia-title .balcony-ia-accent {
    color: #1970fe;
}

.balcony-ia-lead {
    max-width: 34ch;
    margin: clamp(14px, 2vw, 20px) auto 0;
    font-size: clamp(1rem, 1.75vw, 1.25rem);
    line-height: 1.45;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    text-wrap: balance;
}

.balcony-ia-lead em {
    font-style: italic;
    font-weight: 600;
    color: #fff;
}

.balcony-ia-lead strong {
    font-weight: 800;
    color: #fff;
}

.balcony-ia-demo {
    width: min(100%, 520px);
    margin: 0 auto;
    text-align: left;
    padding: clamp(8px, 1.2vw, 12px);
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
    backdrop-filter: blur(16px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 40px 80px -40px rgba(0, 0, 0, 0.55);
}

.balcony-ia-card {
    border-radius: 22px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 24px 60px -32px rgba(15, 23, 51, 0.45);
}

.balcony-ia-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 10px;
    border-bottom: 1px solid #eef1f6;
}

.balcony-ia-head .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f1733;
    letter-spacing: -0.02em;
}

.balcony-ia-head .brand i {
    font-size: 1.25rem;
    color: #1970fe;
}

.balcony-ia-head .brand em {
    font-style: normal;
    color: #1970fe;
    font-weight: 800;
}

.balcony-ia-msgs {
    height: clamp(220px, 32vh, 300px);
    overflow-y: auto;
    padding: 12px 18px 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.balcony-ia-msg {
    animation: balconyIaPop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes balconyIaPop {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.balcony-ia-user {
    display: flex;
    justify-content: flex-end;
}

.balcony-ia-user .bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 92%;
    padding: 10px 14px 10px 10px;
    border-radius: 20px;
    background: #f4f7fc;
    box-shadow: 0 1px 4px rgba(15, 23, 51, 0.06);
    font-size: 0.9rem;
    font-weight: 500;
    color: #0f1733;
    line-height: 1.4;
}

.balcony-ia-user .avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.balcony-ia-bot .bubble {
    display: flex;
    gap: 12px;
    max-width: 96%;
    padding: 14px 16px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(15, 23, 51, 0.08);
}

.balcony-ia-bot .bubble > i {
    font-size: 1.15rem;
    color: #4254ba;
    margin-top: 2px;
    flex-shrink: 0;
}

.balcony-ia-bot .body {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #0f1733;
}

.balcony-ia-big-value {
    margin-top: 10px;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f1733;
}

.balcony-ia-badge-ok {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(23, 164, 151, 0.12);
    box-shadow: inset 0 0 0 1px rgba(23, 164, 151, 0.35);
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f1733;
}

.balcony-ia-badge-ok i {
    color: #17a497;
}

.balcony-ia-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: ia-item;
}

.balcony-ia-list li {
    counter-increment: ia-item;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: 0.88rem;
    border-bottom: 1px solid #eef1f6;
}

.balcony-ia-list li:last-child {
    border-bottom: none;
}

.balcony-ia-list li::before {
    content: counter(ia-item) ". ";
    font-weight: 600;
    color: #5a6480;
}

.balcony-ia-list .neg {
    font-weight: 700;
    color: #f7473a;
}

.balcony-ia-thinking {
    display: inline-flex;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 16px;
    background: #f4f7fc;
}

.balcony-ia-thinking span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8a93a8;
    animation: balconyIaDot 1.2s ease-in-out infinite;
}

.balcony-ia-thinking span:nth-child(2) { animation-delay: 0.15s; }
.balcony-ia-thinking span:nth-child(3) { animation-delay: 0.3s; }

@keyframes balconyIaDot {
    0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-3px); }
}

.balcony-ia-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 12px;
}

.balcony-ia-chips button {
    padding: 4px 12px;
    border-radius: 999px;
    border: none;
    background: #fff;
    box-shadow: inset 0 0 0 1px #4254ba;
    color: #4254ba;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 28px;
    white-space: nowrap;
    cursor: default;
    opacity: 0.85;
}

.balcony-ia-chips button.is-active {
    background: #eef1ff;
    opacity: 1;
}

.balcony-ia-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 14px 14px;
    padding: 0 14px 0 10px;
    height: 52px;
    border-radius: 26px;
    background: #f4f7fc;
    box-shadow: inset 0 0 0 1px #e2e8f3;
}

.balcony-ia-input .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.balcony-ia-input .typed {
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
    color: #0f1733;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.balcony-ia-input .typed.is-placeholder {
    color: #8a93a8;
}

.balcony-ia-input .caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: -2px;
    background: #1970fe;
    animation: balconyIaCaret 1s step-end infinite;
}

@keyframes balconyIaCaret {
    50% { opacity: 0; }
}

.balcony-ia-input .send {
    border: none;
    background: transparent;
    color: #4254ba;
    font-size: 1.35rem;
    line-height: 1;
    padding: 0;
}

@media (max-width: 991.98px) {
    .balcony-ia-hero {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .balcony-ia-msg,
    .balcony-ia-thinking span,
    .balcony-ia-input .caret {
        animation: none !important;
    }
}
