/* =========================================
   CONVERSATIONS TAB STYLES
   Scoped to .conversations-container to avoid conflicts
   ========================================= */

/* Main Container */
.conversations-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

/* Sub Tabs */
.conversations-container .conversations-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 12px;
}

.conversations-container .conversations-tab {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
    border: none;
}

.conversations-container .conversations-tab:hover {
    color: #333;
}

.conversations-container .conversations-tab.active {
    background: #fff;
    color: #007bff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Sections */
.conversations-container .conversations-section {
    margin-bottom: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Collapsible Section Header */
.conversations-container .conversations-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(to right, #f8f9fa, #fff);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    border-bottom: 1px solid #eee;
}

.conversations-container .conversations-section.collapsed .conversations-section-header {
    border-bottom: none;
}

.conversations-container .conversations-section-header:hover {
    background: linear-gradient(to right, #f0f2f5, #fafafa);
}

.conversations-container .conversations-section-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.conversations-container .conversations-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
}

.conversations-container .conversations-section-count {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    background: #e9ecef;
    padding: 3px 10px;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
}

.conversations-container .conversations-section-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.2s ease;
    color: #666;
    background: transparent;
    border-radius: 4px;
    flex-shrink: 0;
}

.conversations-container .conversations-section-header:hover .conversations-section-arrow {
    background: rgba(0,0,0,0.05);
    color: #333;
}

.conversations-container .conversations-section-arrow svg {
    width: 16px;
    height: 16px;
}

.conversations-container .conversations-section.collapsed .conversations-section-arrow {
    transform: rotate(-90deg);
}

.conversations-container .conversations-section-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.25s ease;
    max-height: 5000px;
    opacity: 1;
    padding: 0 12px 12px 12px;
}

.conversations-container .conversations-section.collapsed .conversations-section-content {
    max-height: 0;
    opacity: 0;
    padding-bottom: 0;
}

/* Conversation List */
.conversations-container .conversation-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.conversations-container .conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.conversations-container .conversation-item:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.conversations-container .conversation-item:active {
    background: #f0f2f5;
}

/* Conversation Icon */
.conversations-container .conversation-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    flex-shrink: 0;
}

.conversations-container .conversation-icon svg {
    width: 20px;
    height: 20px;
}

/* Conversation Info */
.conversations-container .conversation-info {
    flex: 1;
    min-width: 0;
}

.conversations-container .conversation-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}

.conversations-container .conversation-preview {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Conversation Meta */
.conversations-container .conversation-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
    min-width: 70px;
}

.conversations-container .conversation-active {
    font-size: 11px;
    color: #28a745;
    font-weight: 500;
    white-space: nowrap;
}

.conversations-container .conversation-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50px;
    line-height: 1;
}

.conversations-container .conversation-time {
    font-size: 11px;
    color: #999;
}

/* Avatar for DMs */
.conversations-container .conversation-item .conv-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.conversations-container .conversation-item .conv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Panel Transitions */
.conversations-container .conversations-panel {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.conversations-container .conversations-panel.active {
    display: block;
    opacity: 1;
}

/* Suggested Action Card */
.conversations-container .suggested-action-card {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f8ff 100%);
    border: 1px solid #b8daff;
    border-radius: 12px;
    margin-bottom: 20px;
}

.conversations-container .suggested-action-card.suggested-action-card--visible {
    display: flex;
}

.conversations-container .suggested-action-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.conversations-container .suggested-action-icon {
    width: 40px;
    height: 40px;
    background: #007bff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conversations-container .suggested-action-icon::before {
    content: "\01F4A1";
    font-size: 18px;
}

.conversations-container .suggested-action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.conversations-container .suggested-action-label {
    font-size: 11px;
    font-weight: 600;
    color: #007bff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversations-container .suggested-action-message {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.conversations-container .suggested-action-detail {
    font-size: 12px;
    color: #666;
}

.conversations-container .suggested-action-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversations-container .suggested-action-dismiss {
    padding: 8px !important;
    background: transparent !important;
    border: none !important;
    color: #666 !important;
    cursor: pointer;
}

.conversations-container .suggested-action-dismiss:hover {
    color: #333 !important;
}

/* Speed Networking */
.conversations-container .speed-networking {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.conversations-container .speed-networking-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffc107;
    border-radius: 50%;
    color: #fff;
}

.conversations-container .speed-networking h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #333;
}

.conversations-container .speed-networking p {
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

.conversations-container .speed-networking .conv-btn-accent {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.conversations-container .speed-networking .conv-btn-accent:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.conversations-container .speed-networking-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #999;
}

.conversations-container .speed-networking-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* In Queue State */
.conversations-container .speed-networking.in-queue .conv-btn-accent {
    background: #dc3545;
    color: #fff;
}

.conversations-container .speed-networking.in-queue .conv-btn-accent:hover {
    background: #c82333;
}

.conversations-container .queue-position {
    font-size: 48px;
    font-weight: 700;
    color: #007bff;
    margin: 16px 0;
}

.conversations-container .queue-position-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Empty State */
.conversations-container .conv-empty-state {
    text-align: center;
    padding: 32px;
    color: #666;
}

.conversations-container .conv-empty-state p {
    margin-bottom: 16px;
}

/* Loading State */
.conversations-container .conversation-list-loading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversations-container .conversation-skeleton {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
}

.conversations-container .skeleton-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: conv-shimmer 1.5s infinite;
    border-radius: 8px;
}

.conversations-container .skeleton-content {
    flex: 1;
}

.conversations-container .skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: conv-shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.conversations-container .skeleton-line:last-child {
    width: 60%;
    margin-bottom: 0;
}

@keyframes conv-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Button Styles - Scoped */
.conversations-container .conv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.conversations-container .conv-btn-primary {
    background: #007bff;
    color: #fff;
}

.conversations-container .conv-btn-primary:hover {
    background: #0056b3;
}

.conversations-container .conv-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.conversations-container .conv-btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.conversations-container .conv-btn-ghost {
    background: transparent;
    color: #666;
}

.conversations-container .conv-btn-ghost:hover {
    background: rgba(0,0,0,0.05);
}

/* Utility Classes - Scoped */
.conversations-container .conv-mt-4 { margin-top: 16px; }
.conversations-container .conv-mt-6 { margin-top: 24px; }
.conversations-container .conv-text-secondary { color: #666; }

/* Online Indicator */
.conversations-container .conv-online-indicator {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid #fff;
    position: absolute;
    bottom: 0;
    right: 0;
}

.conversations-container .conv-avatar-wrapper {
    position: relative;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .conversations-container {
        padding: 16px;
    }

    .conversations-container .conversations-tabs {
        flex-direction: column;
        gap: 4px;
    }

    .conversations-container .suggested-action-card {
        flex-direction: column;
        text-align: center;
    }

    .conversations-container .suggested-action-content {
        flex-direction: column;
    }

    .conversations-container .speed-networking-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* =========================================
   CHAT COMING SOON MODAL
   These styles are for the modal overlay
   which sits outside .conversations-container
   ========================================= */

.conv-chat-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.conv-chat-modal-overlay.active {
    display: flex;
}

.conv-chat-modal {
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

.conv-chat-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.conv-chat-modal-header-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conv-chat-modal-subtitle {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.conv-chat-modal-timeslot {
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.conv-chat-modal-timeslot::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.conv-chat-modal-live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conv-chat-modal-live-status.is-live {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.35);
}

.conv-chat-modal-live-status.not-live {
    background: #f0f0f0;
    color: #888;
}

.conv-chat-modal-live-status .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.conv-chat-modal-live-status.is-live .live-dot {
    background: #fff;
    animation: conv-pulse-live 1.5s ease-in-out infinite;
}

@keyframes conv-pulse-live {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.conv-chat-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.conv-chat-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.conv-chat-modal-close:hover {
    background: #e5e5e5;
}

.conv-chat-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #666;
}

.conv-chat-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.conv-chat-modal-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.conv-chat-modal-icon svg {
    width: 60px;
    height: 60px;
    stroke: #fff;
}

.conv-chat-modal-message {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.conv-chat-modal-submessage {
    font-size: 16px;
    color: #666;
    max-width: 400px;
    line-height: 1.6;
}
