/* Chatrix Web Chat - Admin Inbox/Dashboard Styles */
.chatrix-inbox-wrap {
    max-width: 100%;
    margin: 20px 0;
    padding-right: 15px;
}

.chatrix-inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.chatrix-inbox-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
}

.chatrix-badge-premium {
    background: var(--chatrix-accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.chatrix-inbox-container-premium {
    display: flex;
    height: 750px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #f0f0f1;
}

.chatrix-sessions-sidebar {
    width: 360px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #f0f0f1;
    background: #fff;
    transition: transform 0.3s;
}

.chatrix-sidebar-search {
    padding: 20px;
    border-bottom: 1px solid #f0f0f1;
}

#chatrix-inbox-search {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #f0f0f1;
    background: #f8f9fa;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#chatrix-inbox-search:focus {
    border-color: var(--chatrix-accent);
}

.chatrix-sessions-list-premium {
    flex: 1;
    overflow-y: auto;
}

.chatrix-session-card {
    padding: 18px 20px;
    display: flex;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f8f9fa;
    align-items: center;
}

.chatrix-session-card:hover {
    background: #fcfcfc;
}

.chatrix-session-card.active {
    background: var(--chatrix-accent-soft);
    border-right: 4px solid var(--chatrix-accent);
}

.chatrix-session-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f1 0%, #e0e0e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #555;
    flex-shrink: 0;
}

.chatrix-session-info {
    flex: 1;
    overflow: hidden;
}

.chatrix-session-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chatrix-display-name {
    font-weight: 600;
    font-size: 14px;
    color: #111;
}

.chatrix-msg-time {
    font-size: 11px;
    color: #a1a1a1;
}

.chatrix-session-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatrix-last-msg-text {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatrix-unread-indicator {
    width: 10px;
    height: 10px;
    background: var(--chatrix-accent);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3);
}

.chatrix-session-card.chatrix-unread .chatrix-display-name {
    font-weight: 700;
}

.chatrix-session-card.chatrix-unread .chatrix-last-msg-text {
    color: #111;
    font-weight: 500;
}

.chatrix-chat-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
    min-width: 0;
}

#chatrix-chat-history-container {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    background: #f0f2f5;
}

#chatrix-chat-history-content {
    display: flex;
    flex-direction: column;
    padding: 30px;
    gap: 12px;
}

.chatrix-empty-chat-welcome {
    text-align: center;
    margin-top: 150px;
    opacity: 0.5;
    padding: 20px;
}

.chatrix-welcome-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.chatrix-empty-chat-welcome h2 {
    font-size: 22px;
    margin: 0 0 10px 0;
}

.chatrix-dashboard-reply-area-premium {
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid #f0f0f1;
}

.chatrix-reply-box-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    background: #fff;
    border-radius: 16px;
    padding: 8px 10px 8px 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f1;
}

#chatrix-dashboard-reply-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 10px;
    outline: none;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    font-family: inherit;
}

.chatrix-btn-send-premium {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--chatrix-accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatrix-btn-send-premium:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.chatrix-btn-send-premium svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ADMIN ON LEFT (Green), USER ON RIGHT (White) per requester preference */
.chatrix-admin-msg {
    align-self: flex-start;
    background: var(--chatrix-accent);
    color: #fff;
    padding: 12px 18px;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 75%;
    font-size: 14px;
    line-height: 1.5;
}

.chatrix-visitor-msg {
    align-self: flex-end;
    background: #fff;
    color: #111;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 75%;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #f0f0f1;
}

.chatrix-chat-history-header {
    background: #fff;
    padding: 15px 25px;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10;
    font-weight: 600;
    font-size: 15px;
}

.chatrix-header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.chatrix-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #a1a1a1;
}

.chatrix-empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* Mobile Responsiveness */
@media screen and (max-width: 782px) {
    .chatrix-inbox-wrap {
        margin-top: 10px;
    }

    .chatrix-inbox-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .chatrix-inbox-container-premium {
        flex-direction: column;
        height: auto;
        min-height: 600px;
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        border-left: none;
        border-right: none;
    }

    .chatrix-sessions-sidebar {
        width: 100%;
        height: 350px;
        border-right: none;
        border-bottom: 1px solid #f0f0f1;
    }

    .chatrix-chat-workspace {
        height: 500px;
    }

    .chatrix-admin-wrap {
        padding: 5% 8% 5% 5%;
    }

    /* Mobile specific padding for chat display */
    #chatrix-chat-history-content {
        padding: 15px;
        gap: 10px;
    }

    .chatrix-visitor-msg,
    .chatrix-admin-msg {
        max-width: 85%;
    }

    /* Fix desktop reply area for mobile */
    .chatrix-dashboard-reply-area-premium {
        padding: 15px;
        position: sticky;
        bottom: 0;
        z-index: 20;
    }
}
