/* Mobile Chat Enhancement Styles */
/* Conversation List Styles */

.conversation-list {
    margin-top: 0;
}

.conversation-list ul {
    background: #fff;
}

.conversation-list li {
    position: relative;
    transition: background-color 0.2s ease;
}

.conversation-list li:active {
    background-color: #f7f7f8;
}

/* Conversation Avatar */
.conversation-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    object-fit: cover;
}

/* Conversation Name */
.conversation-name {
    font-weight: 600;
    font-size: 16px;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Conversation Time */
.conversation-time {
    font-size: 13px;
    color: #8e8e93;
    white-space: nowrap;
}

/* Message Preview */
.conversation-preview {
    font-size: 14px;
    color: #8e8e93;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 2px;
}

/* Unread Conversation Styling */
.conversation-unread .conversation-name {
    font-weight: 700;
    color: #000;
}

.conversation-unread .conversation-preview {
    font-weight: 500;
    color: #000;
}

/* Unread Badge */
.unread-badge {
    position: absolute;
    top: 8px;
    left: 38px;
    background-color: #007aff;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Empty State */
.conversation-empty-state {
    list-style: none;
}

.conversation-empty-state .card {
    margin: 20px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hover States for Desktop */
@media (hover: hover) {
    .conversation-list li:hover {
        background-color: #f7f7f8;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .conversation-name {
        font-size: 15px;
    }
    
    .conversation-preview {
        font-size: 13px;
    }
    
    .conversation-time {
        font-size: 12px;
    }
}

/* iOS-specific Adjustments */
.ios .conversation-list .item-inner {
    padding-left: 0;
}

.ios .conversation-list .item-media {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Android-specific Adjustments */
.md .conversation-list .item-inner {
    padding-left: 0;
}

.md .conversation-list .item-media {
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Dark Mode Support */
.theme-dark .conversation-list ul {
    background: #1c1c1d;
}

.theme-dark .conversation-name {
    color: #fff;
}

.theme-dark .conversation-preview {
    color: #8e8e93;
}

.theme-dark .conversation-unread .conversation-preview {
    color: #fff;
}

.theme-dark .conversation-list li:active,
.theme-dark .conversation-list li:hover {
    background-color: #2c2c2e;
}

/* Loading State */
.conversation-list-loading {
    text-align: center;
    padding: 20px;
    color: #8e8e93;
}

/* Pull to Refresh Indicator */
.ptr-preloader {
    color: #007aff;
}

/* Swipe Actions (for future implementation) */
.swipeout-actions-left,
.swipeout-actions-right {
    background-color: #007aff;
}

/* Accessibility Improvements */
.conversation-list a:focus {
    outline: 2px solid #007aff;
    outline-offset: -2px;
}

/* Animation for New Messages */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.conversation-list li.new-message {
    animation: slideIn 0.3s ease-out;
}

/* Badge Pulse Animation for New Messages */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.unread-badge.pulse {
    animation: badgePulse 0.5s ease-in-out;
}
