/* Garden WhatsApp-style Message System Styles - WordPress Theme Version */

/* Message Sidebar Container */
.message-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 80% !important;
    height: 100vh !important;
    background: #f8faf8 !important;
    z-index: 1050 !important;
    transition: right 0.3s ease, visibility 0.3s ease, opacity 0.3s ease !important;
    display: flex !important;
    font-family: 'Inter', sans-serif !important;
    visibility: hidden !important;
    opacity: 0 !important;
    box-sizing: border-box !important;
    border-left: 3px solid #28a745 !important; /* Debug border to show it's working */
}

.message-sidebar.open {
    right: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Mobile-specific message sidebar adjustments */
@media (max-width: 991.98px) {
    .message-sidebar {
        right: -100%;
        width: 70%;
    }
    
    .message-sidebar.open {
        right: 0;
    }
}

@media (max-width: 767.98px) {
    .message-sidebar {
        right: -100%;
        width: 85%;
    }
    
    .message-sidebar.open {
        right: 0;
    }
}

@media (max-width: 575.98px) {
    .message-sidebar {
        right: -100%;
        width: 95%;
    }
    
    .message-sidebar.open {
        right: 0;
    }
}

/* Sidebar Navigation */
.sidebar-nav {
    width: 60px;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    border-right: 1px solid #e1e5e9;
}

.chat-list {
    width: 280px;
    background-color: white;
    border-right: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
}

.chat-area {
    flex: 1;
    background-color: white;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    padding: 16px 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background-color: #f0f2f5;
    position: relative;
}

/* Message container for proper alignment */
.chat-messages::after {
    content: '';
    display: table;
    clear: both;
}

/* Today separator */
.message-separator {
    text-align: center;
    margin: 20px 0;
    position: relative;
    clear: both;
}

.message-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e1e5e9;
    z-index: 1;
}

.message-separator span {
    background-color: #f0f2f5;
    padding: 0 12px;
    color: #667781;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.chat-input {
    background-color: white;
    border-top: 1px solid #e1e5e9;
    padding: 16px 20px;
    min-height: 70px;
    display: flex;
    align-items: center;
}

/* Message Bubbles */
.message-bubble {
    max-width: 75%;
    min-width: 120px;
    position: relative;
    margin-bottom: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    width: fit-content;
    display: block;
    opacity: 1;
    transition: opacity 0.2s ease;
    clear: both;
}

.message-bubble.loaded {
    opacity: 1;
}

.message-incoming {
    background-color: white;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding: 12px 16px;
    float: left;
    margin-right: auto;
    border: 1px solid #e1e5e9;
}

.message-outgoing {
    background-color: #2d5a2d;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    text-align: left;
    padding: 12px 16px;
    float: right;
    margin-left: auto;
}

/* Message content styling */
.message-content {
    color: #111b21;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}

.message-outgoing .message-content {
    color: white;
}

.message-time {
    font-size: 12px;
    color: #667781;
    margin-top: 4px;
    opacity: 0.8;
}

.message-outgoing .message-time {
    color: rgba(255, 255, 255, 0.8);
}

/* Navigation Icons */
.nav-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    text-decoration: none;
    color: #667781;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.nav-icon:hover {
    background-color: #e8f5e8;
    color: #2d5a2d;
}

.nav-icon.active {
    background-color: #2d5a2d;
    color: #ffffff;
}

.nav-icon.active i {
    color: #ffffff;
}

/* Search Input */
.search-input {
    background-color: #e8f5e8;
    border: none;
    border-radius: 20px;
    padding: 10px 14px 10px 44px;
    font-size: 14px;
}

.search-input:focus {
    box-shadow: 0 0 0 2px rgba(45, 90, 45, 0.2);
    border-color: #2d5a2d;
}

/* Chat Items */
.chat-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f2f5;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-item:hover {
    background-color: #f0f8f0;
}

.chat-item.active {
    background-color: #e8f5e8;
    border-left: 4px solid #2d5a2d;
}

.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-weight: 600;
    color: #111b21;
    font-size: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-preview {
    color: #667781;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.chat-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.chat-time {
    font-size: 12px;
    color: #667781;
    white-space: nowrap;
}

.chat-badge {
    background-color: #2d5a2d;
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0 5px;
}

.unread-badge {
    background-color: #2d5a2d;
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0 5px;
}

/* Enhanced Chat Item Styles for Friends */
.chat-status {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #667781;
    margin-bottom: 2px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.status-indicator.online {
    background-color: #25d366;
}

.status-indicator.offline {
    background-color: #667781;
}

.status-indicator.away {
    background-color: #ffa726;
}

.friendship-date,
.user-location,
.request-date {
    font-size: 11px;
    color: #8e8e8e;
    margin-top: 2px;
}

.friendship-status {
    margin-top: 4px;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Enhanced Button Styles */
.btn-group-sm .btn {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-group-sm .icon-small {
    width: 14px;
    height: 14px;
}

/* Search Input Enhancements */
.search-input {
    padding-left: 40px;
    border-radius: 20px;
    border: 1px solid #e1e5e9;
    font-size: 14px;
}

.search-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #667781;
    z-index: 1;
}

/* Friends View Tabs */
.btn-check:checked + .btn-outline-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-check:checked + .btn-outline-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

/* Notification Styles */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Message Input */
.message-input {
    background-color: #f0f2f5;
    border: none;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 16px;
    flex: 1;
    margin: 0 8px;
}

.message-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(45, 90, 45, 0.2);
    border-color: #2d5a2d;
}

.input-button {
    background: none;
    border: none;
    color: #667781;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-button:hover {
    background-color: #e8f5e8;
    color: #2d5a2d;
}

.input-button:active {
    transform: scale(0.95);
}

/* Avatar and Logo */
.avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2d5a2d 0%, #1e3d1e 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

/* Typography */
.message-time {
    font-size: 13px;
    color: #667781;
    margin-top: 4px;
}

.chat-preview {
    color: #667781;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-name {
    font-weight: 600;
    color: #111b21;
    font-size: 16px;
}

.contact-status {
    color: #667781;
    font-size: 15px;
}

.message-content {
    color: #111b21;
    font-size: 16px;
    line-height: 1.5;
}

/* Icons */
.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #667781;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.icon-small {
    width: 16px;
    height: 16px;
}

.icon-large {
    width: 24px;
    height: 24px;
}

/* File Upload Menu */
.file-upload-menu {
    position: fixed;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px;
    display: none;
    z-index: 1000;
}

.file-upload-menu.show {
    display: block;
}

.upload-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.upload-option:hover {
    background-color: #e8f5e8;
}

/* Image Upload Dialog */
#image-upload-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#image-preview-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

#image-preview {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 16px;
}

#thumbnail-carousel {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.thumbnail-item {
    position: relative;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.thumbnail-item.active {
    border-color: #4a90e2;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #2d5a2d;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.remove-thumbnail {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

/* Drag and Drop Overlay */
#drag-drop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 90, 45, 0.1);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    pointer-events: none;
}

#hover-preview {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
}

#hover-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .message-sidebar {
        width: 80%;
    }
    
    .chat-list {
        width: 240px;
    }
    
    .sidebar-nav {
        width: 50px;
        padding: 12px 0;
    }
}

@media (max-width: 991.98px) {
    .chat-list {
        width: 200px;
    }
    
    .sidebar-nav {
        width: 45px;
        padding: 10px 0;
    }
}

/* Desktop Layout - Show by default */
.desktop-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Mobile Layout - Hide by default */
.mobile-layout {
    display: none;
    width: 100%;
    height: 100%;
}

/* Ensure proper mobile layout structure */
.mobile-layout .mobile-contact-list,
.mobile-layout .mobile-chat-view {
    width: 100%;
    height: 100vh;
}

/* Mobile layout visibility */
@media (max-width: 768px) {
    .mobile-layout {
        display: block;
    }
    
    .desktop-layout {
        display: none;
    }
}

/* Mobile WhatsApp-style Layout */
@media (max-width: 768px) {
    .message-sidebar {
        width: 100%;
        right: -100%;
        background: white;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
    }
    
    .message-sidebar.open {
        right: 0;
    }
    
    /* Prevent body scroll when messenger is open on mobile */
    body.messenger-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100vh !important;
    }
    
    /* Hide desktop layout on mobile */
    .desktop-layout {
        display: none;
    }
    
    /* Show mobile layout on mobile */
    .mobile-layout {
        display: block;
    }
    
    /* Mobile Contact List View */
    .mobile-contact-list {
        display: flex;
        flex-direction: column;
        height: 100vh;
        background: white;
    }
    
    .mobile-contact-list .chat-list {
        width: 100%;
        border-right: none;
        flex: 1;
    }
    
    .mobile-contact-list .chat-area {
        display: none;
    }
    
    /* Mobile Chat View */
    .mobile-chat-view {
        display: none;
        flex-direction: column;
        height: 100vh;
        background: white;
    }
    
    .mobile-chat-view.active {
        display: flex;
    }
    
    .mobile-chat-view .chat-list {
        display: none;
    }
    
    .mobile-chat-view .chat-area {
        display: flex;
        flex: 1;
        width: 100%;
    }
    
    /* Mobile Header with Back Button */
    .mobile-chat-header {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        background: #f8f9fa;
        border-bottom: 1px solid #e1e5e9;
        min-height: 60px;
    }
    
    .mobile-back-btn {
        background: none;
        border: none;
        color: #2d5a2d;
        padding: 8px;
        margin-right: 12px;
        border-radius: 50%;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .mobile-back-btn:hover {
        background-color: #e8f5e8;
    }
    
    .mobile-chat-info {
        flex: 1;
        display: flex;
        align-items: center;
    }
    
    .mobile-chat-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        margin-right: 12px;
        object-fit: cover;
    }
    
    .mobile-chat-details {
        flex: 1;
    }
    
    .mobile-chat-name {
        font-weight: 600;
        color: #111b21;
        font-size: 16px;
        margin: 0;
    }
    
    .mobile-chat-status {
        color: #667781;
        font-size: 14px;
        margin: 0;
    }
    
    /* Mobile Contact List Header */
    .mobile-contact-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        background: white;
        border-bottom: 1px solid #e1e5e9;
        min-height: 60px;
    }
    
    .mobile-contact-title {
        font-size: 24px;
        font-weight: 700;
        color: #111b21;
        margin: 0;
    }
    
    .mobile-contact-search {
        position: relative;
        flex: 1;
        margin: 0 16px;
    }
    
    .mobile-contact-search .search-input {
        width: 100%;
        padding: 12px 16px 12px 48px;
        font-size: 16px;
        border-radius: 20px;
        background-color: #f0f2f5;
        border: none;
    }
    
    .mobile-contact-search .search-icon {
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Mobile Chat Items */
    .mobile-chat-item {
        padding: 12px 20px;
        cursor: pointer;
        border-bottom: 1px solid #f0f2f5;
        transition: background-color 0.2s ease;
        display: flex;
        align-items: center;
    }
    
    .mobile-chat-item:hover {
        background-color: #f8f9fa;
    }
    
    .mobile-chat-item.active {
        background-color: #e8f5e8;
    }
    
    .mobile-chat-item-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        margin-right: 12px;
        object-fit: cover;
    }
    
    .mobile-chat-item-content {
        flex: 1;
        min-width: 0;
    }
    
    .mobile-chat-item-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }
    
    .mobile-chat-item-name {
        font-weight: 600;
        color: #111b21;
        font-size: 16px;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .mobile-chat-item-time {
        font-size: 14px;
        color: #667781;
        margin: 0;
    }
    
    .mobile-chat-item-preview {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .mobile-chat-item-message {
        color: #667781;
        font-size: 14px;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
    }
    
    .mobile-chat-item-badge {
        background-color: #2d5a2d;
        color: white;
        font-size: 12px;
        font-weight: 600;
        min-width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        padding: 0 6px;
        margin-left: 8px;
    }
    
    /* Mobile Chat Messages */
.mobile-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #f0f2f5;
}

/* Mobile Message Bubbles - Ensure they're visible */
.mobile-chat-messages .message-bubble {
    max-width: 75%;
    min-width: 120px;
    position: relative;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    width: fit-content;
    display: inline-block;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.mobile-chat-messages .message-bubble.message-in {
    background-color: white;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding: 12px 16px;
    margin-right: auto;
}

.mobile-chat-messages .message-bubble.message-out {
    background-color: #2d5a2d;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    text-align: left;
    padding: 12px 16px;
    margin-left: auto;
}

.mobile-chat-messages .message-content {
    color: #111b21;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.mobile-chat-messages .message-bubble.message-out .message-content {
    color: white;
}

/* Additional mobile message bubble styles for better visibility */
.mobile-chat-messages .message-bubble {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-chat-messages .message-bubble.message-in {
    background-color: white !important;
    border: 1px solid #e1e5e9;
    border-radius: 18px 18px 18px 4px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    padding: 12px 16px !important;
    margin-right: auto !important;
    margin-bottom: 8px !important;
}

.mobile-chat-messages .message-bubble.message-out {
    background-color: #2d5a2d !important;
    border-radius: 18px 18px 4px 18px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
    padding: 12px 16px !important;
    margin-left: auto !important;
    margin-bottom: 8px !important;
}

.mobile-chat-messages .message-content {
    color: #111b21 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    display: block !important;
}

.mobile-chat-messages .message-bubble.message-out .message-content {
    color: white !important;
}

/* Ensure message containers are properly styled */
.mobile-chat-messages > div {
    margin-bottom: 16px;
}

.mobile-chat-messages .message-bubble p {
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: flex;
    background-color: white;
    border-top: 1px solid #e1e5e9;
    padding: 8px 0;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    color: #667781;
}

.mobile-nav-item:hover {
    background-color: #f8f9fa;
}

.mobile-nav-item.active {
    color: #2d5a2d;
    background-color: #e8f5e8;
    border-radius: 8px;
    position: relative;
}

.mobile-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: #2d5a2d;
    border-radius: 2px;
}

.mobile-nav-item.active .mobile-nav-icon {
    transform: scale(1.1);
}

.mobile-nav-item.active .mobile-nav-label {
    font-weight: 600;
}

/* Mobile Settings Navigation */
.mobile-settings-nav {
    display: flex;
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.mobile-settings-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #667781;
    font-size: 12px;
    font-weight: 500;
}

.mobile-settings-nav-item:hover {
    background-color: #e9ecef;
    color: #2d5a2d;
}

.mobile-settings-nav-item.active {
    background-color: #2d5a2d;
    color: white;
}

.mobile-settings-nav-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Mobile Settings Tabs */
.mobile-settings-tab {
    display: none;
}

.mobile-settings-tab.active {
    display: block;
}

.mobile-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.mobile-nav-label {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(50%);
    background-color: #2d5a2d;
    color: white;
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0 4px;
    margin-right: -8px;
}

/* Mobile Floating Action Button */
.mobile-fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #2d5a2d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(45, 90, 45, 0.3);
    transition: all 0.2s ease;
    z-index: 200;
}

.mobile-fab:hover {
    background-color: #1e3d1e;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(45, 90, 45, 0.4);
}

.mobile-fab-icon {
    width: 24px;
    height: 24px;
    color: white;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Force visibility for all message elements in mobile */
.mobile-chat-messages * {
    visibility: visible !important;
}

.mobile-chat-messages .message-bubble,
.mobile-chat-messages .message-content,
.mobile-chat-messages .message-bubble p {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Override any Bootstrap or other framework styles */
.mobile-chat-messages .p-3 {
    padding: 12px 16px !important;
}

.mobile-chat-messages .mb-0 {
    margin-bottom: 0 !important;
}
    
    .mobile-chat-input {
        background-color: white;
        border-top: 1px solid #e1e5e9;
        padding: 12px 16px;
    }
    
    .mobile-chat-input-container {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .mobile-message-input {
        flex: 1;
        background-color: #f0f2f5;
        border: none;
        border-radius: 20px;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    .mobile-message-input:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(45, 90, 45, 0.2);
    }
    
    .mobile-send-btn {
        background-color: #2d5a2d;
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .mobile-send-btn:hover {
        background-color: #1e3d1e;
    }
    
    /* Hide desktop elements on mobile */
.message-sidebar > .desktop-layout {
    display: none;
}

/* Show mobile layout on mobile */
.message-sidebar > .mobile-layout {
    display: block;
    }
}

/* Overlay for background dimming */
.message-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.message-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Chat Emoji Picker Styling */
#chat-emoji-picker {
    position: fixed;
    z-index: 2000;
    background: white !important;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-width: 350px;
    max-height: 400px;
    font-family: 'Inter', sans-serif;
}

/* Force white background on all emoji picker elements */
#chat-emoji-picker,
#chat-emoji-picker *,
#chat-emoji-picker::part(root),
#chat-emoji-picker::part(panel),
#chat-emoji-picker::part(panel-root),
#chat-emoji-picker::part(header),
#chat-emoji-picker::part(content),
#chat-emoji-picker::part(footer),
#chat-emoji-picker::part(sticky-header),
#chat-emoji-picker::part(search-field),
#chat-emoji-picker::part(category-button),
#chat-emoji-picker::part(emoji),
#chat-emoji-picker::part(tab),
#chat-emoji-picker emoji-picker,
#chat-emoji-picker emoji-picker * {
    background-color: white !important;
    background: white !important;
}

/* Emoji Picker Theme Customization - White Background */
#chat-emoji-picker::part(search-field) {
    background-color: white !important;
    background: white !important;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    color: #111b21;
    font-size: 14px;
}

#chat-emoji-picker::part(search-field):focus {
    box-shadow: 0 0 0 2px rgba(45, 90, 45, 0.2);
    border-color: #2d5a2d;
    background-color: white !important;
    background: white !important;
}

#chat-emoji-picker::part(category-button) {
    color: #667781;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: white !important;
    background: white !important;
}

#chat-emoji-picker::part(category-button):hover {
    background-color: #f8f9fa !important;
    background: #f8f9fa !important;
    color: #2d5a2d;
}

#chat-emoji-picker::part(category-button)[selected] {
    background-color: #2d5a2d !important;
    background: #2d5a2d !important;
    color: white;
}

#chat-emoji-picker::part(emoji) {
    border-radius: 6px;
    transition: all 0.2s ease;
    background-color: white !important;
    background: white !important;
}

#chat-emoji-picker::part(emoji):hover {
    background-color: #f8f9fa !important;
    background: #f8f9fa !important;
    transform: scale(1.1);
}

#chat-emoji-picker::part(sticky-header) {
    background-color: white !important;
    background: white !important;
    border-bottom: 1px solid #e1e5e9;
}

#chat-emoji-picker::part(tab) {
    color: #667781;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: white !important;
    background: white !important;
}

#chat-emoji-picker::part(tab):hover {
    background-color: #f8f9fa !important;
    background: #f8f9fa !important;
    color: #2d5a2d;
}

#chat-emoji-picker::part(tab)[selected] {
    background-color: #2d5a2d !important;
    background: #2d5a2d !important;
    color: white;
}

#chat-emoji-picker::part(header) {
    background-color: white !important;
    background: white !important;
    border-bottom: 1px solid #e1e5e9;
}

#chat-emoji-picker::part(content) {
    background-color: white !important;
    background: white !important;
}

#chat-emoji-picker::part(footer) {
    background-color: white !important;
    background: white !important;
    border-top: 1px solid #e1e5e9;
}

/* CSS Custom Properties Override */
#chat-emoji-picker {
    --epr-bg-color: white !important;
    --epr-category-label-bg-color: white !important;
    --epr-category-label-bg-color-hover: #f8f9fa !important;
    --epr-category-label-bg-color-active: #2d5a2d !important;
    --epr-search-input-bg-color: white !important;
    --epr-search-input-border-color: #e1e5e9 !important;
    --epr-search-input-border-color-active: #2d5a2d !important;
    --epr-emoji-size: 24px !important;
    --epr-emoji-padding: 6px !important;
    --epr-category-emoji-padding: 6px !important;
    --epr-category-emoji-size: 24px !important;
    --epr-picker-border-radius: 12px !important;
    --epr-search-input-border-radius: 8px !important;
    --epr-category-label-border-radius: 8px !important;
    --epr-emoji-border-radius: 6px !important;
}

/* Additional aggressive overrides */
#chat-emoji-picker *,
#chat-emoji-picker::before,
#chat-emoji-picker::after {
    background-color: white !important;
    background: white !important;
}

/* Shadow DOM overrides */
#chat-emoji-picker::part(root) {
    background-color: white !important;
    background: white !important;
}

#chat-emoji-picker::part(panel) {
    background-color: white !important;
    background: white !important;
}

#chat-emoji-picker::part(panel-root) {
    background-color: white !important;
    background: white !important;
}
