﻿:root {
    /* ✅ Adjust these 3 if you want an exact match */
    --ace-primary: #0b5ed7; /* button blue */
    --ace-navy: #0a2342; /* dark/navy */
    --ace-sky: #1a9cff; /* gradient accent */

    --bg: #f5f8ff; /* light page background */
    --surface: #ffffff; /* card/panel */
    --border: #e6edf7;
    --text: #0a2342;
    --muted: #5f6b7a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, Arial;
    background: transparent;
}

.wrap {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    color: var(--text);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--ace-navy), var(--ace-primary));
    border-bottom: 1px solid rgba(255,255,255,.18);
}

.title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.logoMark {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    font-weight: 800;
    letter-spacing: .5px;
}

.hdrText {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.actions {
    display: flex;
    gap: 6px;
}

.iconbtn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.10);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    line-height: 0;
}

    .iconbtn:hover {
        background: rgba(255,255,255,.16);
    }

.log {
    flex: 1;
    padding: 12px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* subtle “website-like” background */
    background: radial-gradient(900px 450px at 10% 0%, rgba(11,94,215,.10), transparent 55%), radial-gradient(900px 450px at 90% 0%, rgba(26,156,255,.08), transparent 55%), var(--bg);
}

.bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.user {
    align-self: flex-end;
    color: #fff;
    background: linear-gradient(135deg, var(--ace-primary), var(--ace-sky));
    border-bottom-right-radius: 6px;
}

.bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
    border-bottom-left-radius: 6px;
}

.form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
}

    .input:focus {
        outline: none;
        border-color: rgba(11,94,215,.45);
        box-shadow: 0 0 0 3px rgba(11,94,215,.12);
    }

.send {
    padding: 10px 12px;
    border-radius: 12px;
    border: 0;
    background: var(--ace-primary);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

    .send:hover {
        filter: brightness(.95);
    }

.sendIcon {
    width: 18px;
    height: 18px;
    fill: #fff;
    display: block;
}

.typing {
    align-self: flex-start;
    color: var(--muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .typing .dot {
        width: 6px;
        height: 6px;
        border-radius: 999px;
        background: var(--muted);
        opacity: .35;
        animation: blink 1.2s infinite;
    }

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

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

@keyframes blink {
    0%,100% {
        opacity: .25;
        transform: translateY(0);
    }

    50% {
        opacity: .9;
        transform: translateY(-1px);
    }
}

.aceTextIcon {
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.aceIcon {
    width: 16px;
    height: 16px
}

.aceLabel {
    font-weight: 800;
    letter-spacing: .2px
}

.aceBot {
    font-size: 14px;
    line-height: 1
}

/* Bot bubble with overlapping avatar */
.botRow {
    position: relative;
    margin: 10px 0;
}

    /* Move the bubble right to make room for avatar overlap */
    .botRow .bubble.bot {
        display: inline-block;
        max-width: 88%;
        padding-left: 28px; /* space so text doesn't sit under avatar */
        margin-left: 10px; /* slight offset */
    }

/* Avatar overlaps bubble */
.botAvatar {
    position: absolute;
    left: 0;
    top: 8px; /* tweak for vertical alignment */
    width: 26px;
    height: 26px;
    border-radius: 999px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

/* Header avatar (replaces the old dot) */
.hdrAvatar{
  width:20px;
  height:20px;
  border-radius:999px;
  object-fit:cover;
  background:#fff;
  border:1px solid rgba(255,255,255,.35);
  box-shadow:0 6px 14px rgba(0,0,0,.16);
}
