﻿:root {
    --bg: #080f18;
    --panel: #101923;
    --header: #142330;
    --bot: #1b2a38;
    --text: #eff6ff;
    --muted: #8fa3b8;
    --blue: #139df2;
    --purple: #a934eb;
    --green: #56e29d;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 15% 10%, rgba(15,149,255,.18), transparent 35%),
        radial-gradient(circle at 90% 90%, rgba(207,44,237,.14), transparent 35%),
        #050a11;
    color: var(--text);
}

button,
input {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.chat-app {
    width: 100%;
    max-width: 540px;
    height: min(900px, calc(100vh - 40px));
    background: var(--panel);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 35px 100px rgba(0,0,0,.55);
}

.chat-header {
    min-height: 76px;
    background: rgba(19,34,47,.98);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.back {
    width: 28px;
    color: white;
    text-decoration: none;
    font-size: 34px;
    line-height: 1;
}

.avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: linear-gradient(135deg, #00a8ff, #d82cf0);
    box-shadow: 0 0 24px rgba(45,174,255,.25);
}

.profile {
    flex: 1;
    min-width: 0;
}

.profile strong {
    display: block;
    font-size: 16px;
}

.profile span {
    display: block;
    color: var(--green);
    font-size: 12px;
    margin-top: 4px;
}

.brand-mini {
    color: #8091a3;
    font-size: 11px;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 22px 15px 12px;
    scroll-behavior: smooth;

    background:
        linear-gradient(rgba(8,15,24,.96), rgba(8,15,24,.96)),
        radial-gradient(circle at center, rgba(255,255,255,.05), transparent 70%);
}

.message-row {
    display: flex;
    margin-bottom: 10px;
}

.message-row.user {
    justify-content: flex-end;
}

.message {
    position: relative;
    max-width: 84%;
    padding: 11px 13px 8px;
    border-radius: 15px;
    line-height: 1.45;
    font-size: 15px;
    box-shadow: 0 5px 18px rgba(0,0,0,.12);
}

.message-row.bot .message {
    background: var(--bot);
    border-bottom-left-radius: 4px;
}

.message-row.user .message {
    background: linear-gradient(135deg, #087cd9, #7832cf);
    border-bottom-right-radius: 4px;
}

.time {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    text-align: right;
    opacity: .62;
}

.typing {
    width: 63px;
    padding: 14px 16px;
    border-radius: 15px;
    border-bottom-left-radius: 4px;
    background: var(--bot);
    display: flex;
    gap: 4px;
}

.typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8094a6;
    animation: typing 1s infinite;
}

.typing span:nth-child(2) {
    animation-delay: .15s;
}

.typing span:nth-child(3) {
    animation-delay: .30s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: .45;
    }

    30% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.quick-replies {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    overflow: visible;
    padding: 8px 12px;
    min-height: 0;
    max-height: 230px;
    overflow-y: auto;
    background: #0d1620;
    border-top: 1px solid rgba(255,255,255,.05);
}

.quick-replies:empty {
    display: none;
}

.quick-button {
    width: 100%;
    min-height: 36px;
    border: 1px solid #168cdd;
    color: #5bc5ff;
    background: rgba(14,91,143,.12);
    border-radius: 14px;
    padding: 7px 11px;
    cursor: pointer;
    transition: .18s ease;
    font-size: 13px;
    line-height: 1.2;
    text-align: left;
    white-space: normal;
}

.quick-button:hover {
    background: rgba(21,143,218,.2);
}

.composer {
    display: flex;
    gap: 9px;
    padding:
        10px
        12px
        max(10px, env(safe-area-inset-bottom));

    background: #101923;
}

.composer input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(255,255,255,.08);
    background: #1b2733;
    color: white;
    outline: none;
    border-radius: 24px;
    padding: 13px 17px;
}

.composer input:focus {
    border-color: rgba(32,163,240,.7);
}

.composer button {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    font-size: 18px;
    background: linear-gradient(135deg, #0697ef, #a033e3);
}

.cta-card {
    margin-top: 11px;
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 12px;
}

.buy-button {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    border-radius: 11px;
    color: white;
    font-weight: 800;
    background: linear-gradient(90deg, #078ff0, #af31e3);
}

@media(max-width:600px) {

    .app-shell {
        padding: 0;
    }

    .chat-app {
        max-width: none;
        height: 100dvh;
        border-radius: 0;
        border: 0;
    }

    .brand-mini {
        display: none;
    }
}

/* =========================================
   ADRYJU BOT v0.1.1 - PRODUCT CARD
   ========================================= */

.product-card-wrap {
    display: flex;
    margin: 8px 0 18px;
}

.product-card {
    width: 100%;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(65, 177, 255, .25);

    background:
        radial-gradient(
            circle at top right,
            rgba(196, 47, 235, .18),
            transparent 42%
        ),
        linear-gradient(
            145deg,
            #142332,
            #0e1823
        );

    box-shadow:
        0 18px 45px rgba(0,0,0,.25);
}

.product-eyebrow {
    color: #58caff;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 800;
}

.product-icon {
    width: 52px;
    height: 52px;
    margin-top: 17px;
    border-radius: 16px;

    display: grid;
    place-items: center;

    font-weight: 900;

    background:
        linear-gradient(
            135deg,
            #009cf0,
            #c833e9
        );

    box-shadow:
        0 10px 30px
        rgba(52,136,255,.25);
}

.product-card h3 {
    margin:
        16px 0 7px;

    font-size: 22px;
}

.product-card p {
    margin: 0;
    color: #aab9c8;
    line-height: 1.55;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin-top: 16px;
}

.product-features span {
    padding:
        7px 10px;

    border-radius:
        999px;

    font-size:
        11px;

    color:
        #c7eaff;

    background:
        rgba(16, 139, 211, .12);

    border:
        1px solid
        rgba(52, 164, 231, .20);
}


/* =========================================================
   ADRYJU BOT v0.3.0 - NOVA CONVERSA
   ========================================================= */

.new-conversation-button {
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.07);
    color: inherit;
    border-radius: 999px;
    padding: 7px 11px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.new-conversation-button:hover {
    background: rgba(255, 255, 255, 0.13);
}

.new-conversation-button:active {
    transform: scale(0.97);
}

.new-conversation-button:disabled {
    cursor: default;
    opacity: 0.5;
}

@media (max-width: 520px) {

    .new-conversation-button {
        padding: 6px 9px;
        font-size: 11px;
    }

}


/* ADRYJU BOT v0.4.0 — FLOW #001 MEDIA */
.commercial-media-wrap {
    margin: 8px 0 16px;
    border-radius: 18px;
    overflow: hidden;
    background: #0b1420;
    border: 1px solid rgba(64, 176, 255, .22);
    box-shadow: 0 16px 38px rgba(0,0,0,.28);
}
.commercial-media {
    display: block;
    width: auto;
    max-width: 86%;
    max-height: 430px;
    margin: 0 auto;
    object-fit: contain;
    background: #050a10;
}
.commercial-audio {
    display: block;
    width: calc(100% - 24px);
    margin: 14px 12px 8px;
}
.commercial-media-caption {
    padding: 9px 12px 12px;
    color: #b9dfff;
    font-size: 12px;
    font-weight: 700;
}

.recording-audio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 15px;
    border-bottom-left-radius: 4px;
    background: var(--bot);
    color: #d9e8f5;
    font-size: 13px;
}
.recording-mic { font-size: 18px; }
.recording-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d67;
    animation: recordingPulse 1s infinite;
}
@keyframes recordingPulse {
    0%,100% { transform: scale(.8); opacity: .45; }
    50% { transform: scale(1.25); opacity: 1; }
}

/* v0.4.2 — mídia mais compacta para convivência com menus fixos */
@media (max-width: 700px) {
    .commercial-media-wrap {
        margin: 6px 0 10px;
    }

    .commercial-media {
        max-width: 80%;
        max-height: 340px;
    }

    .commercial-media-caption {
        padding: 6px 10px 8px;
        font-size: 11px;
    }
}

@media (max-height: 760px) {
    .commercial-media {
        max-height: 300px;
    }
}

/* v0.4.3 — foto real da consultora */
.avatar {
    overflow: hidden;
    padding: 0 !important;
}
.avatar img,
.product-icon.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.product-icon.profile-photo {
    overflow: hidden;
    padding: 0;
    border-radius: 16px;
}


/* ==========================================================
   v0.4.4 — MENUS DENTRO DO DIÁLOGO
   ========================================================== */

.inline-choice-menu {
    width: min(88%, 520px);
    margin: 6px 0 14px 0;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    border: 1px solid rgba(43, 166, 255, .28);
    border-radius: 16px;
    background: linear-gradient(
        145deg,
        rgba(15, 29, 43, .98),
        rgba(11, 20, 31, .98)
    );
    box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.inline-choice-button {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(44, 177, 255, .72);
    border-radius: 12px;
    background: rgba(15, 73, 110, .16);
    color: #63caff;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease,
        opacity .18s ease;
}

.inline-choice-button:hover:not(:disabled) {
    background: rgba(24, 132, 196, .24);
    transform: translateY(-1px);
}

.inline-choice-button.selected {
    border-color: #8a54ff;
    background: linear-gradient(
        90deg,
        rgba(25, 136, 229, .30),
        rgba(128, 54, 226, .30)
    );
    color: #fff;
}

.inline-choice-button:disabled {
    cursor: default;
    opacity: .42;
}

.inline-choice-button.selected:disabled {
    opacity: 1;
}

/* a antiga área fixa permanece vazia e não ocupa a visão */
.quick-replies {
    display: none !important;
}

@media (max-width: 700px) {
    .inline-choice-menu {
        width: 92%;
        margin-bottom: 10px;
        padding: 6px;
        gap: 6px;
    }

    .inline-choice-button {
        min-height: 36px;
        padding: 7px 10px;
        font-size: 12.5px;
    }
}
