/** * CiBanten Jitu - Internal Chat & HelpDesk Extension Stylesheet
 * Custom UI Refactoring 2026
 */

/* 1. Floating Trigger Button Mobile */
#chat-mobile-btn {
    position: fixed;
    bottom: 15px;
    right: 10px;
    z-index: 99999;
    border-radius: 50px;
    padding: 5px 12px;
    height: 45px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    backdrop-filter: blur(8px);
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.5), 0 0 8px rgba(0, 191, 255, 0.6);
    max-width: 90vw;
}

#chat-mobile-btn .chat-text {
    font-size: 14px;
    color: #000;
    font-weight: bold;
}

#chat-mobile-btn img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

#chat-badge-mobile {
    display: none;
    position: absolute;
    top: -5px;
    right: -5px;
    border-radius: 50%;
    padding: 5px 8px;
    border: 2px solid #fff;
    z-index: 999999;
}

/* 2. Main Chat Window Frame */
#chat-container-main {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 99998;
    width: 380px;
    height: 75vh;
    max-height: 800px;
    background: #fff;
    border-radius: 15px;
}

#chat-container-main .card {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
}

/* 3. Header & Dropdown Actions Menu */
.chat-custom-header {
    cursor: pointer;
    padding: 10px 15px;
}

#chat-header-title {
    flex-grow: 1;
}

#typing-status {
    display: none;
    color: #2ecc71;
    font-weight: bold;
    font-size: 10px;
}

.chat-menu-wrapper {
    gap: 8px;
    position: relative;
}

.chat-menu-btn-trigger {
    height: 32px;
    width: 32px;
    padding: 0;
    border-radius: 10px;
    border: none;
}

.chat-menu-btn-trigger i {
    font-size: 14px;
}

#myChatMenu {
    display: none;
    position: absolute;
    top: 40px;
    right: 40px;
    background: white;
    border-radius: 10px;
    min-width: 150px;
    z-index: 9999;
    border: 1px solid #f0f0f0;
}

#myChatMenu a {
    text-decoration: none;
    font-size: 13px;
}

#myChatMenu a i {
    width: 20px;
}

.chat-menu-divider {
    border-top: 1px solid #eee;
    margin: 5px 0;
}

.chat-btn-close {
    height: 32px;
    width: 32px;
    padding: 0;
    border-radius: 10px;
    border: none;
}

/* 4. Alert Broadcast Banner */
.chat-alert-banner {
    background: rgba(23, 162, 184, 0.08);
    border-radius: 10px;
    border: 1px dashed rgba(23, 162, 184, 0.3);
}

.chat-alert-banner small {
    font-weight: 600;
    font-size: 10px;
    line-height: 1.4;
}

/* 5. View Area Layout Panels */
#chat-body-toggle {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

#chat-history-list {
    flex-grow: 1;
    overflow-y: auto;
    background: #fff;
}

#chat-window {
    display: none;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    background: #f8f9fa;
    height: calc(100vh - 150px);
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* 6. Interaction Elements & Footer Components */
#chat-footer-interaksi {
    display: none;
    position: relative;
}

.chat-action-bar {
    gap: 5px;
    padding: 2px 5px;
}

.chat-media-triggers {
    gap: 5px;
    margin-bottom: 5px;
}

#btn-emoji-toggle {
    width: 35px;
    height: 40px;
    border: none;
    background: transparent;
    justify-content: center;
    align-items: center;
}

#btn-emoji-toggle i {
    font-size: 20px;
}

.chat-btn-camera {
    width: 35px;
    height: 40px;
    border: none;
    background: transparent;
}

.chat-btn-camera i {
    font-size: 18px;
}

/* 7. Input Container Field */
#input-pesan {
    min-height: 35px;
    max-height: 100px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    background: #fdfdfd;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    margin-bottom: 1px;
}

.chat-send-wrapper {
    margin-bottom: 5px;
}

#btn-kirim {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
}

#btn-kirim i {
    font-size: 20px;
}

/* 8. Message Previews Compartments (Reply & Image Upload) */
#reply-preview {
    display: none;
    padding: 10px;
    background: #e3f2fd;
    border-left: 4px solid #007bff;
    border-bottom: 1px solid #ddd;
    position: relative;
}

#reply-text {
    font-size: 11px;
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 85%;
    line-height: 1.4;
}

.chat-cancel-reply-btn {
    background: none;
    border: none;
    color: #ff0000;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

#image-preview-container {
    display: none;
    padding: 10px;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    position: relative;
}

.chat-img-preview-wrapper {
    position: relative;
    display: inline-block;
}

#img-preview-target {
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
    border: 2px solid #007bff;
    object-fit: cover;
}

.chat-cancel-img-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff0000;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
}

.chat-img-ready-text {
    font-size: 10px;
}

#emoji-picker {
    display: none;
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}