﻿#smsInboxPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 550px;
    height: 600px;
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    border-radius: 18px;
    z-index: 2101;
    display: none;
}

.sms-inbox-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sms-inbox-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* 👈 makes it draggable */
    background: #f8f9fa;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
#resizeHandle {
    position: absolute;
    width: 12px;
    height: 12px;
    bottom: 5px;
    right: 5px;
    cursor: se-resize;
    background: #ccc;
}
.sms-inbox-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sms-conversations {
    width: 350px;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.sms-thread {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}
.sms-convo-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

    .sms-convo-item.active {
        background: #f1f7ff;
        border-left: 4px solid #007bff;
    }
.sms-thread-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sms-thread-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.sms-thread-reply {
    display: none;
    border-top: 1px solid #eee;
    padding: 10px;
    background: #fafafa;
}
/*CHAT POPUP*/
/*--------------------------------------------------------------------------*/

.chat-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg,#007bff,#0056b3);
    color: white;
    padding: 10px 15px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-status {
    font-size: 12px;
    opacity: .8;
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #fffdf2;
}

.sms-left {
    position: relative;
    background: #e5e5ea;
    padding: 10px 14px;
    border-radius: 18px;
    margin-bottom: 8px;
    max-width: 75%;
}

.sms-right {
    position:relative;
    background: #007aff;
    color: white;
    padding: 10px 14px;
    border-radius: 18px;
    margin-bottom: 8px;
    margin-left: auto;
    max-width: 75%;
}
    .sms-right[data-internal="true"] {
        background: linear-gradient(12deg,#ff9800, #fbbf24, #007aff, #fbbf24,#ff9800);
    }
    .delete-message-icon {
        font-size: 13px;
        position: absolute;
        right: 7px;
        top: 3px;
        z-index: 50;
        cursor: pointer;
    }
.chat-footer {
    padding: 10px;
    display: flex;
    gap: 5px;
    border-top: 1px solid #eee;
}

    .chat-footer textarea {
        flex: 1;
        border-radius: 12px;
        padding: 8px;
        resize: none;
    }

    .chat-footer button {
        background: #007aff;
        border: none;
        color: white;
        border-radius: 12px;
        padding: 6px 14px;
    }

.chat-icon {
    background: none;
    border: none;
    color: white;
    margin-left: 8px;
}

.chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007aff;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.resize-handle {
    width: 15px;
    height: 15px;
    background: transparent;
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
}

.message-body {
    margin-bottom: 4px;
    font-size: 14px;
}

.message-meta {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

/*--------------------------------------------------------------------------*/