/* ABC Messaging Plugin Styles */

.abc-messaging-app {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

/* Conversations Page */
.abc-conversations-page {
    min-height: 80vh;
}

/* Chat Page */
.abc-chat-page {
    display: flex;
    flex-direction: column;
    height: 86vh;
}

.abc-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.abc-header h2 {
    margin: 0;
    font-size: 24px;
}

.abc-btn-new {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.abc-btn-new:hover {
    background: #0056b3;
}

.abc-search {
    margin: 15px;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    width: calc(100% - 30px);
}

.abc-conversations {
    overflow-y: auto;
}

.abc-conversation {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
}

.abc-conversation:hover {
    background: #f5f5f5;
}

.abc-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

.abc-conv-info {
    flex: 1;
}

.abc-conv-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.abc-conv-last {
    color: #666;
    font-size: 14px;
}

.abc-conv-meta {
    text-align: right;
}

.abc-conv-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.abc-unread {
    background: #007bff;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* Chat Area */
.abc-chat-page .abc-chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.abc-chat-page .abc-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
}

.abc-chat-page .abc-input-box {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.abc-btn-back {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
}

.abc-chat-header .abc-avatar {
    width: 40px;
    height: 40px;
}

.abc-user-info {
    flex: 1;
}

.abc-name {
    font-weight: 600;
}

.abc-actions button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
}

/* Messages */
.abc-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9f9;
}

.abc-message {
    display: flex;
    margin-bottom: 15px;
}

.abc-sent {
    justify-content: flex-end;
}

.abc-bubble {
    max-width: 60%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.abc-received .abc-bubble {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.abc-sent .abc-bubble {
    background: #007bff;
    color: #fff;
}

.abc-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.abc-sent .abc-time {
    color: rgba(255,255,255,0.7);
}

.abc-edited {
    font-size: 11px;
    font-style: italic;
    opacity: 0.7;
    margin-left: 5px;
}

.abc-msg-actions {
    position: absolute;
    top: -25px;
    right: 0;
    display: none;
    gap: 5px;
}

.abc-bubble:hover .abc-msg-actions {
    display: flex;
}

.abc-msg-actions button {
    background: rgba(0,0,0,0.7);
    border: none;
    padding: 5px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.abc-msg-image {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 5px;
    cursor: pointer;
}

.abc-msg-file {
    display: block;
    margin-top: 5px;
    color: inherit;
    text-decoration: none;
}

/* Input Box */
.abc-input-box {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.abc-input-box input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
}

.abc-input-box button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.abc-btn-send {
    background: #007bff !important;
    color: #fff !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abc-btn-send:hover {
    background: #0056b3 !important;
}

/* Modals */
.abc-modal {
    position: fixed !important;
    z-index: 9999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.5) !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.abc-modal[style*="display:none"],
.abc-modal[style*="display: none"] {
    display: none !important;
}

.abc-modal[style*="display:block"],
.abc-modal[style*="display: block"] {
    display: flex !important;
}

.abc-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 10000;
}

.abc-close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.abc-close:hover {
    color: #f00;
}

.abc-modal-content h3 {
    margin-top: 0;
}

.abc-modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.abc-user-result,
.abc-blocked-user {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.abc-user-result:hover {
    background: #f5f5f5;
}

.abc-user-result .abc-avatar,
.abc-blocked-user .abc-avatar {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.abc-blocked-user {
    justify-content: space-between;
}

.abc-blocked-user button {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
}

.abc-menu-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
}

.abc-menu-btn:hover {
    background: #e9ecef;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .abc-messaging-app {
        height: 96vh;
        margin: 0;
        border-radius: 0;
    }
    
    .abc-chat-page {
        height: 86vh;
    }
    
    .abc-sidebar {
        width: 100%;
    }
    
    .abc-bubble {
        max-width: 80%;
    }
}
