/* ========================================
   AI Bot Engine - Shared Chat UI
   ======================================== */

.aibe-chat-shell,
.aibe-chat-shell * {
    box-sizing: border-box;
}

/* Remove theme table borders when a table/row/cell wraps the chat shell */
table:has(.aibe-chat-shell),
tr:has(.aibe-chat-shell),
td:has(> .aibe-chat-shell),
th:has(> .aibe-chat-shell) {
    border: none !important;
    padding: 0 !important;
}

.aibe-chat-shell {
    font-family: 'Montserrat', Arial, sans-serif;
    background: var(--aibe-bg, #071733);
    color: #ffffff;
    border-radius: 18px !important;
    overflow: hidden;
    max-width: 1200px;
    margin: 0;
    border: 1px white solid !important;
    box-shadow: none;
}

.aibe-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--aibe-bg, #071733);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aibe-chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aibe-chat-header-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.aibe-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.aibe-chat-header-form {
    margin: 0;
}

.aibe-no-bots-notice {
    padding: 12px 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aibe-bot-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding: 0 24px;
    background: var(--aibe-bg, #071733);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
}

.aibe-bot-tabs::-webkit-scrollbar {
    display: none;
}

.aibe-bot-tab {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: -1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.aibe-bot-tab:hover {
    color: rgba(255, 255, 255, 0.85);
}

.aibe-bot-tab.is-active {
    color: #ffffff;
    border-bottom-color: #61b0e0;
}

.aibe-drawer-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.aibe-drawer-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.aibe-btn-new,
.aibe-btn-new-conversation,
.aibe-send-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: #1d2c43;
    color: #ffffff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.aibe-btn-new:hover,
.aibe-btn-new-conversation:hover,
.aibe-send-button:hover {
    background: #243751;
    border-color: rgba(255, 255, 255, 0.4);
}

.aibe-btn-new:active,
.aibe-btn-new-conversation:active,
.aibe-send-button:active {
    transform: translateY(1px);
}

.aibe-chat-body {
    display: grid;
    grid-template-columns: 360px 1fr;
    min-height: 720px;
    background: var(--aibe-bg, #071733);
}

.aibe-conversation-list {
    background: var(--aibe-bg, #071733);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
}

.aibe-conversation-row {
    margin: 0;
}

.aibe-conversation-button {
    width: 100%;
    display: block;
    text-align: left;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    padding: 22px 24px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.aibe-conversation-button:hover {
    background: rgba(255, 255, 255, 0.04);
}

.aibe-conversation-button.selected {
    background: rgba(255, 255, 255, 0.08);
}

.aibe-conversation-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
}

.aibe-conversation-date {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.aibe-empty-conversations {
    padding: 28px 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    line-height: 1.5;
}

.aibe-empty-conversations p {
    margin: 0;
}

/* ========================================
   Conversation row + inline title edit
   ======================================== */

.aibe-conversation-row {
    position: relative;
}

.aibe-conversation-edit-btn,
.aibe-conversation-archive-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.aibe-conversation-edit-btn {
    right: 44px;
}

.aibe-conversation-archive-btn {
    right: 12px;
}

.aibe-conversation-row:hover .aibe-conversation-edit-btn,
.aibe-conversation-row:hover .aibe-conversation-archive-btn {
    opacity: 1;
}

.aibe-conversation-edit-btn:hover,
.aibe-conversation-archive-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.aibe-conversation-archive-btn:hover {
    color: #e8a369;
}

.aibe-conversation-archived .aibe-conversation-button {
    opacity: 0.5;
}

.aibe-conversation-archived .aibe-conversation-title {
    text-decoration: line-through;
}

.aibe-conversation-filter {
    padding: 10px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aibe-show-archived-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.aibe-show-archived-toggle {
    accent-color: #61b0e0;
    cursor: pointer;
}

.aibe-conversation-edit-wrap {
    padding: 16px 24px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aibe-conversation-date-edit {
    padding: 0 24px 14px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    font-weight: 500;
}

.aibe-conversation-edit-input {
    width: 100%;
    background: #1d2c43;
    border: 1px solid #61b0e0;
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    box-shadow: 0 0 0 2px rgba(97, 176, 224, 0.15);
    margin-bottom: 10px;
}

.aibe-conversation-edit-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.aibe-conversation-edit-actions {
    display: flex;
    gap: 8px;
}

.aibe-conversation-save-btn,
.aibe-conversation-cancel-btn {
    padding: 6px 14px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.aibe-conversation-save-btn {
    background: #61b0e0;
    color: #ffffff;
    border-color: #61b0e0;
}

.aibe-conversation-save-btn:hover {
    background: #7abfe8;
}

.aibe-conversation-cancel-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}

.aibe-conversation-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.aibe-conversation-thread {
    display: flex;
    flex-direction: column;
    height: 720px;
    overflow: hidden;
    background: var(--aibe-bg, #071733);
}

.aibe-empty-thread {
    flex: 1 1 auto;
}

.aibe-messages {
    flex: 1 1 0;
    min-height: 0;
    padding: 28px 28px 14px;
    overflow-y: auto;
}

.aibe-load-all-wrapper {
    text-align: center;
    padding-bottom: 18px;
}

.aibe-load-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.aibe-load-all-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.aibe-message {
    max-width: 82%;
    margin-bottom: 24px;
}

.aibe-message-user {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.aibe-message-bot,
.aibe-message-assistant {
    margin-right: auto;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.aibe-bot-avatar {
    width: 62px;
    max-height: 62px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    align-self: flex-start;
}

.aibe-user-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    align-self: flex-start;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.15s ease;
}

.aibe-user-avatar-btn:hover {
    opacity: 0.8;
}

.aibe-user-avatar {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.aibe-user-avatar-placeholder {
    width: 36px;
    height: 36px;
}

.aibe-message-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.aibe-message-content {
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 500;
    word-break: break-word;
}

.aibe-message-user .aibe-message-content {
    background: var(--aibe-user-bubble-bg, #4498d8);
    color: var(--aibe-user-bubble-text, #ffffff);
}

.aibe-message-bot .aibe-message-content,
.aibe-message-assistant .aibe-message-content {
    background: var(--aibe-bot-bubble-bg, #e6ad23);
    color: var(--aibe-bot-bubble-text, #212a37);
}

.aibe-message-time {
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.68);
}

.aibe-message-user .aibe-message-time {
    text-align: right;
}

.aibe-empty-thread {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.aibe-composer {
    flex: 0 0 auto;
    padding: 20px 28px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--aibe-bg, #071733);
}

.aibe-token-limit-banner {
    flex: 0 0 auto;
    padding: 20px 28px 24px;
    border-top: 2px solid rgba(196, 88, 25, 0.55);
    background: rgba(196, 88, 25, 0.1);
}

.aibe-token-limit-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #e8a369;
    margin-bottom: 8px;
}

.aibe-token-limit-banner-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
}

.aibe-token-limit-banner-message strong {
    color: #ffffff;
}

.aibe-token-limit-banner-actions {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.aibe-token-limit-topup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: #e6ad23;
    color: #212a37;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease;
}

.aibe-token-limit-topup:hover {
    background: #f0bc2e;
    color: #212a37;
}

.aibe-composer-form {
    margin: 0;
}

.aibe-composer-input {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #1d2c43;
    color: #ffffff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    outline: none;
}

.aibe-composer-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.aibe-composer-input:focus {
    border-color: #61b0e0;
    box-shadow: 0 0 0 2px rgba(97, 176, 224, 0.15);
}

.aibe-composer-actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

.aibe-send-button {
    min-width: 110px;
}

@media (max-width: 980px) {
    .aibe-chat-body {
        display: block;
        position: relative;
        min-height: 0;
    }

    .aibe-conversation-list {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(300px, 85vw);
        transform: translateX(-105%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 30;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        overflow-y: auto;
    }

    .aibe-chat-shell.aibe-drawer-open .aibe-conversation-list {
        transform: translateX(0);
    }

    .aibe-drawer-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 25;
        cursor: pointer;
    }

    .aibe-drawer-toggle {
        display: flex;
    }

    .aibe-conversation-thread {
        height: calc(100dvh - 160px);
        min-height: 400px;
    }

    .aibe-message {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .aibe-chat-shell {
        border-radius: 0;
    }

    .aibe-chat-header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .aibe-messages {
        padding: 20px 18px 10px;
    }

    .aibe-composer {
        padding: 18px;
    }
}


/* ========================================
   Processing / Loading State
   ======================================== */

.aibe-chat-shell.aibe-is-loading .aibe-composer-input,
.aibe-chat-shell.aibe-is-loading .aibe-send-button {
    opacity: 0.55;
    cursor: not-allowed;
}

.aibe-conversation-thread {
    position: relative;
}

.aibe-thread-spinner {
    position: absolute;
    inset: 0;
    background: rgba(7, 23, 51, 0.6);
    z-index: 20;
    pointer-events: none;
}

.aibe-thread-spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid rgba(97, 176, 224, 0.25);
    border-top-color: #61b0e0;
    border-radius: 50%;
    animation: aibe-spin 0.7s linear infinite;
}

@keyframes aibe-spin {
    to { transform: rotate(360deg); }
}

.aibe-send-button:disabled,
.aibe-composer-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.aibe-processing-indicator {
    display: none;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 28px 20px;
}

.aibe-processing-indicator.is-visible {
    display: flex;
}

.aibe-processing-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(230, 173, 35, 0.9);
    animation: aibe-processing-pulse 1s infinite ease-in-out;
}

.aibe-processing-dot:nth-child(2) {
    animation-delay: 0.16s;
}

.aibe-processing-dot:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes aibe-processing-pulse {
    0%,
    80%,
    100% {
        transform: scale(0.75);
        opacity: 0.35;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   Thinking Bubble (assistant typing)
   ======================================== */

.aibe-message-thinking .aibe-message-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-width: 52px;
    padding: 12px 14px;
}

.aibe-thinking-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.2;
    transition: opacity 0.15s ease;
    display: inline-block;
}

.aibe-thinking-dot.is-active {
    opacity: 1;
}

/* ========================================
   Usage Bar
   ======================================== */

.aibe-usage-bar {
    flex: 0 0 auto;
    padding: 6px 28px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    text-align: right;
    letter-spacing: 0.01em;
}

/* ========================================
   Pacing Limit Banner
   ======================================== */

.aibe-pacing-limit-banner {
    flex: 0 0 auto;
    padding: 20px 28px 24px;
    border-top: 2px solid rgba(96, 165, 250, 0.45);
    background: rgba(30, 64, 120, 0.35);
}

.aibe-pacing-limit-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 8px;
}

.aibe-pacing-limit-banner-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.55;
}

.aibe-pacing-limit-banner-message strong {
    color: #ffffff;
}

/* ========================================
   Overspend Section (inside pacing banner)
   ======================================== */

.aibe-pacing-overspend {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aibe-pacing-overspend-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 10px;
}

.aibe-pacing-overspend-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.aibe-pacing-overspend-picker-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.aibe-overspend-datetime {
    background: #1d2c43;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 10px;
    color: #ffffff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aibe-overspend-datetime:focus {
    border-color: #61b0e0;
    box-shadow: 0 0 0 2px rgba(97, 176, 224, 0.15);
}

/* Tint the browser-native calendar/clock picker icon to match the theme */
.aibe-overspend-datetime::-webkit-calendar-picker-indicator {
    filter: invert(0.75);
    cursor: pointer;
}

.aibe-overspend-consequence {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin-bottom: 14px;
}

.aibe-overspend-token-count {
    color: #ffffff;
    font-weight: 700;
}

.aibe-overspend-confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 10px;
    border: none;
    background: #61b0e0;
    color: #ffffff;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.aibe-overspend-confirm-btn:hover {
    background: #7abfe8;
}

.aibe-overspend-confirm-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ========================================
   Overspend Active Banner
   ======================================== */

.aibe-overspend-active-banner {
    flex: 0 0 auto;
    padding: 10px 28px;
    background: rgba(30, 64, 120, 0.25);
    border-top: 1px solid rgba(96, 165, 250, 0.25);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.aibe-overspend-active-banner strong {
    color: #ffffff;
}


/* ========================================
   File Attachment UI
   ======================================== */

/* Paperclip attach button */
.aibe-attach-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: color 0.15s ease;
    flex: 0 0 auto;
    transform: scale(1.3);
    transform-origin: center;
    margin-right: 10px;
}

.aibe-attach-button:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* Pending attachment badge shown above Send */
.aibe-attachment-pending {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(96, 165, 250, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aibe-attachment-clear {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    flex: 0 0 auto;
}

.aibe-attachment-clear:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Attachment message bubble */
.aibe-message-attachment-bubble .aibe-message-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.aibe-attachment-icon {
    flex: 0 0 auto;
    opacity: 0.75;
}

.aibe-attachment-filename {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.aibe-attachment-size {
    opacity: 0.6;
    white-space: nowrap;
    font-size: 11px;
}

/* ========================================
   Export Bar
   ======================================== */

.aibe-export-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 4px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.aibe-export-clipboard-btn,
.aibe-export-download-btn {
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s ease;
}

.aibe-export-clipboard-btn:hover,
.aibe-export-download-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* ========================================
   Message Meta Row (time + copy button)
   ======================================== */

.aibe-message-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.aibe-copy-msg-btn {
    background: transparent;
    border: none;
    padding: 2px;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    line-height: 1;
    border-radius: 3px;
    opacity: 0;
    transition: color 0.15s ease, opacity 0.15s ease;
    flex: 0 0 auto;
}

.aibe-message:hover .aibe-copy-msg-btn {
    opacity: 1;
}

.aibe-copy-msg-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

.aibe-copy-msg-btn--copied {
    color: #6ee7b7 !important;
    opacity: 1 !important;
}
