/* =========================================================
   IDEALIZE.IA - ASSISTENTE VIRTUAL (ETAPA 2)
   Arquivo separado para não interferir no CSS principal.
   ========================================================= */

.idealize-chat-launcher {
    position: fixed;
    right: 16px;
    bottom: 92px;
    z-index: 80;
    width: 62px;
    height: 62px;
    border: 1px solid rgba(49,225,247,.55);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(139,92,255,.98), rgba(49,225,247,.88));
    box-shadow: 0 14px 38px rgba(139,92,246,.38), 0 0 28px rgba(49,225,247,.22);
    color: #fff;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.idealize-chat-launcher:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 42px rgba(139,92,246,.5), 0 0 34px rgba(49,225,247,.3);
}

.idealize-chat-launcher svg { width: 30px; height: 30px; }

.idealize-chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #2ee69b;
    color: #07110d;
    font-size: 11px;
    font-weight: 800;
    display: grid;
    place-items: center;
    border: 2px solid #0b0a12;
}

.idealize-chat-panel {
    position: fixed;
    right: 16px;
    bottom: 166px;
    z-index: 90;
    width: min(390px, calc(100vw - 32px));
    height: min(610px, calc(100vh - 190px));
    min-height: 470px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(11,10,18,.98);
    border: 1px solid rgba(139,92,255,.45);
    box-shadow: 0 24px 70px rgba(0,0,0,.6), 0 0 42px rgba(139,92,246,.24);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.idealize-chat-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.idealize-chat-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 14px;
    background: linear-gradient(120deg, rgba(139,92,255,.22), rgba(49,225,247,.10));
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.idealize-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #151222;
    border: 1px solid rgba(49,225,247,.35);
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.idealize-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.idealize-chat-headtext { min-width: 0; flex: 1; }
.idealize-chat-headtext strong { display: block; font-size: .96rem; }
.idealize-chat-subtitle { display:block; margin-top:1px; font-size:.70rem; color:#b8b1ca; line-height:1.25; }
.idealize-chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #b6b0c9;
    font-size: .76rem;
}
.idealize-chat-status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ee69b;
    box-shadow: 0 0 10px rgba(46,230,155,.8);
}

.idealize-chat-close,
.idealize-chat-reset {
    border: 0;
    color: #dcd6ef;
    background: rgba(255,255,255,.05);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.idealize-chat-close:hover,
.idealize-chat-reset:hover { background: rgba(139,92,255,.18); color: #fff; }

.idealize-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 13px 12px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139,92,255,.5) transparent;
}

.idealize-chat-msg {
    max-width: 86%;
    padding: 11px 13px;
    border-radius: 15px;
    font-size: .9rem;
    line-height: 1.48;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.idealize-chat-msg.bot {
    align-self: flex-start;
    color: #f6f3ff;
    background: #1a0e33;
    border: 1px solid rgba(139,92,255,.22);
    border-bottom-left-radius: 5px;
}

.idealize-chat-msg.user {
    align-self: flex-end;
    color: #07110d;
    background: linear-gradient(135deg, #31E1F7, #2ee69b);
    border-bottom-right-radius: 5px;
    font-weight: 500;
}

.idealize-chat-typing {
    align-self: flex-start;
    padding: 10px 13px;
    border-radius: 15px 15px 15px 5px;
    background: #1a0e33;
    border: 1px solid rgba(139,92,255,.22);
    display: none;
    gap: 5px;
}
.idealize-chat-typing.show { display: flex; }
.idealize-chat-typing i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b6b0c9;
    animation: idealizeTyping 1.15s infinite ease-in-out;
}
.idealize-chat-typing i:nth-child(2) { animation-delay: .14s; }
.idealize-chat-typing i:nth-child(3) { animation-delay: .28s; }
@keyframes idealizeTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.idealize-chat-suggestions {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 0 13px 10px;
    scrollbar-width: none;
}
.idealize-chat-suggestions::-webkit-scrollbar { display: none; }
.idealize-chat-suggestion {
    flex: 0 0 auto;
    border: 1px solid rgba(49,225,247,.28);
    color: #dffcff;
    background: rgba(49,225,247,.06);
    border-radius: 999px;
    padding: 8px 10px;
    font: inherit;
    font-size: .75rem;
    cursor: pointer;
}
.idealize-chat-suggestion:hover { background: rgba(49,225,247,.13); }

.idealize-chat-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 11px 11px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(11,10,18,.96);
}

.idealize-chat-input {
    flex: 1;
    min-height: 44px;
    max-height: 110px;
    resize: none;
    border-radius: 13px;
    border: 1px solid rgba(139,92,255,.32);
    background: #151222;
    color: #f6f3ff;
    padding: 11px 12px;
    font: inherit;
    font-size: .88rem;
    outline: none;
}
.idealize-chat-input:focus {
    border-color: rgba(49,225,247,.7);
    box-shadow: 0 0 0 2px rgba(49,225,247,.08);
}
.idealize-chat-input::placeholder { color: #8f88a3; }

.idealize-chat-send {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 13px;
    color: #07110d;
    background: linear-gradient(135deg, #8b5cff, #31E1F7);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.idealize-chat-send:disabled { opacity: .45; cursor: wait; }
.idealize-chat-send svg { width: 21px; height: 21px; }

.idealize-chat-footer-note {
    margin: 0;
    padding: 0 12px 10px;
    color: #7f7892;
    font-size: .67rem;
    text-align: center;
}

@media (max-width: 640px) {
    .idealize-chat-panel {
        right: 8px;
        bottom: 84px;
        width: calc(100vw - 16px);
        height: min(670px, calc(100dvh - 100px));
        min-height: 0;
        border-radius: 18px;
    }
    .idealize-chat-launcher { right: 12px; bottom: 86px; }
    .float-whats { right: 12px; }
}
