#tahaai-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 999999;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

#tahaai-root,
#tahaai-root * {
    box-sizing: border-box;
}

#tahaai-fab {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    cursor: pointer;
    padding: 12px 14px;
    border-radius: 999px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
    background: #111827;
    color: #fff;
    appearance: none;
    -webkit-appearance: none;
}

.tahaai-fab-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
}

.tahaai-fab-text {
    font-weight: 700;
    letter-spacing: .2px;
}

#tahaai-panel {
    position: absolute;
    right: 0;
    bottom: 56px;
    width: 360px;
    max-width: calc(100vw - 24px);
    height: 520px;
    max-height: calc(100vh - 96px);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
    overflow: hidden;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: .18s ease;
    border: 1px solid rgba(17, 24, 39, .10);
}

#tahaai-panel.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.tahaai-header {
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    padding: 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tahaai-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tahaai-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: .6px;
}

.tahaai-name {
    font-weight: 800;
    font-size: 14px;
}

.tahaai-sub {
    font-size: 12px;
    opacity: .85;
    margin-top: 2px;
}

.tahaai-iconbtn {
    border: 0;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 20px;
    line-height: 1;
}

.tahaai-body {
    height: calc(520px - 58px - 38px);
    max-height: calc(100vh - 96px - 58px - 38px);
    overflow: auto;
    padding: 12px;
    background: #f8fafc;
}

.tahaai-card {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    padding: 12px;
}

.tahaai-card-title {
    font-weight: 800;
    margin-bottom: 10px;
    color: #111827;
}

.tahaai-label {
    display: block;
    margin: 10px 0 6px;
    font-size: 12px;
    color: #374151;
    font-weight: 700;
}

.tahaai-req {
    color: #ef4444;
}

.tahaai-opt {
    color: #6b7280;
    font-weight: 700;
    font-size: 11px;
}

.tahaai-input {
    width: 100%;
    border: 1px solid rgba(17, 24, 39, .14);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
    background: #fff;
    font-size: 14px;
}

.tahaai-input:focus {
    border-color: rgba(17, 24, 39, .35);
    box-shadow: 0 0 0 4px rgba(17, 24, 39, .08);
}

.tahaai-btn {
    width: 100%;
    margin-top: 12px;
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    padding: 11px 12px;
    background: #111827;
    color: #fff;
    font-weight: 800;
}

.tahaai-btn:hover {
    filter: brightness(.98);
}

.tahaai-error {
    margin-top: 10px;
    background: #fef2f2;
    border: 1px solid rgba(239, 68, 68, .25);
    color: #991b1b;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
}

.tahaai-note {
    margin-top: 10px;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.35;
}

.tahaai-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tahaai-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 6px;
}

.tahaai-msg {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.35;
    border: 1px solid rgba(17, 24, 39, .08);
    background: #fff;
}

.tahaai-msg.bot {
    align-self: flex-start;
    border-top-left-radius: 10px;
}

.tahaai-msg.user {
    align-self: flex-end;
    background: #111827;
    color: #fff;
    border-color: rgba(255, 255, 255, .08);
    border-top-right-radius: 10px;
}

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

.tahaai-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #9ca3af;
    animation: tahaai-bounce 1.2s infinite ease-in-out;
}

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

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

@keyframes tahaai-bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: .6;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.tahaai-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tahaai-qbtn {
    border: 1px solid rgba(17, 24, 39, .12);
    background: #fff;
    border-radius: 999px;
    padding: 9px 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
    color: #111827;
}

.tahaai-qbtn:hover {
    background: #f3f4f6;
}

.tahaai-inputbar {
    display: flex;
    gap: 8px;
    position: sticky;
    bottom: 0;
    padding: 10px;
    background: rgba(248, 250, 252, .92);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, .06);
}

.tahaai-send {
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    padding: 10px 12px;
    background: #111827;
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
}

.tahaai-footer {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6b7280;
    border-top: 1px solid rgba(17, 24, 39, .08);
    background: #fff;
}

@media (max-width:420px) {
    #tahaai-panel {
        width: 92vw;
        height: 72vh;
    }

    .tahaai-body {
        height: calc(72vh - 58px - 38px);
    }
}