/* ================================================================
   ARISE chat_additions.css — v1.4
   ================================================================ */

/* ── Header ── */
.chatbot header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.chatbot-header-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.chatbot-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .4);
    flex-shrink: 0;
}

.chatbot header h2 {
    font-size: 1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#arise_model_select {
    flex-shrink: 0;
    max-width: 130px;
    font-size: 10.5px;
    height: 26px;
    padding: 0 4px;
    margin-right: 10px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, .4);
    background: rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    outline: none;
}

#arise_model_select option,
#arise_model_select optgroup {
    background: #fff;
    color: #1a3a7a;
    font-size: 13px;
}

/* ── Tool buttons row ── */
.arise-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.arise-tool-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 0;
    transition: all .15s;
    flex-shrink: 0;
}

.arise-tool-btn:hover {
    border-color: var(--primary-dark-blue, #1a479b);
    color: var(--primary-dark-blue, #1a479b);
    background: rgba(26, 71, 155, .06);
}

.arise-tool-btn.recording {
    border-color: #dc3545;
    color: #dc3545;
    background: rgba(220, 53, 69, .08);
}

.arise-tool-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

@keyframes arise-pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .4
    }
}

#arise_stt_btn.recording {
    animation: arise-pulse .7s ease-in-out infinite;
}

/* ════════════════════════════════════════════════
   MESSAGE COL — FIX FLEX LAYOUT
   ════════════════════════════════════════════════ */

/* Το .chatbox .chat { display:flex } κάνει το <li> flex row.
   Avatar span (32px) + arise-msg-col (max 75%) */
.chatbox .incoming .arise-msg-col {
    flex: 0 1 auto;
    /* δεν τεντώνει */
    min-width: 0;
    max-width: calc(100% - 52px);
    /* 100% - (32px avatar + 20px margin) */
}

/* Override του .chatbox .chat p { max-width:75% } που εφαρμόζεται
   και στο nested <p> μέσα στο .arise-msg-col */
.chatbox .incoming .arise-msg-col p.arise-msg-text {
    max-width: 100% !important;
    border-radius: 10px 10px 10px 0;
}

/* ── Model badge + actions footer ── */
.arise-msg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 3px;
    min-height: 16px;
}

small.arise-msg-model {
    font-size: 9px;
    color: #bbb;
    font-style: italic;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.arise-msg-actions {
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0;
    transition: opacity .15s;
    flex-shrink: 0;
}

.chatbox .incoming:hover .arise-msg-actions {
    opacity: 1;
}

/* ── Copy / TTS buttons
   Metronic override: .chatbox .incoming span { background:blue; width:32px }
   πιάνει τα <span class="iconify"> μέσα στα buttons.
   Τώρα τα icons είναι <svg> (Iconify rendered) οπότε δεν πιάνονται.
   Override στα ίδια τα <button> elements: ── */
.chatbox .arise-copy-btn,
.chatbox .arise-tts-btn,
.chatbox .arise-tr-btn,
.chatbox .arise-send-btn {
    all: unset !important;
    /* reset Metronic/Bootstrap */
    box-sizing: border-box !important;
    cursor: pointer !important;
    color: #bbb !important;
    width: 25px !important;
    height: 25px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 3px !important;
    font-size: 14px !important;
    transition: color .12s, background-color .12s !important;
    background: transparent !important;
}

.chatbox .arise-copy-btn:hover {
    color: #1a479b !important;
    background: rgba(26, 71, 155, .1) !important;
}

.chatbox .arise-tts-btn:hover {
    color: #198754 !important;
    background: rgba(25, 135, 84, .1) !important;
}

.chatbox .arise-tr-btn:hover {
    color: #ff007b !important;
    background: rgba(26, 71, 155, .1) !important;
}

.chatbox .arise-send-btn:hover {
    color: #5e7c2e !important;
    background: rgba(25, 135, 84, .1) !important;
}


/* Αν τα icons είναι ακόμα <span> (πριν Iconify render): */
.chatbox .arise-copy-btn>span,
.chatbox .arise-tts-btn>span {
    background: transparent !important;
    background-color: transparent !important;
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
    border-radius: 0 !important;
    margin: 0 !important;
    color: inherit !important;
    display: inline-flex !important;
}

/* ── Thinking pulse animation ── */
.chatbox .incoming span.arise-thinking img {
    animation: arise-thinking-pulse 1s ease-in-out infinite !important;
    display: block;
}

@keyframes arise-thinking-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .3;
        transform: scale(.82);
    }
}