/* Live Activity Page Styles - Three Column Layout */

.live-activity-page {
    padding: 1.5rem;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Page Header */
.page-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
 margin-bottom: 1.5rem;
  padding-bottom: 1rem;
border-bottom: 1px solid #e0e0e0;
}

.page-title-section h1 {
    font-size: 2rem;
font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.page-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.header-actions {
 display: flex;
    gap: 1rem;
    align-items: center;
}

/* Ensure button and badge have same height */
.header-action-button {
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    padding: 0 1rem !important;
}

.live-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem;
    height: 36px;
    background: #d4edda;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
}

.live-status-badge.disconnected {
 background: #f8d7da;
    border-color: #f5c6cb;
}

.live-status-badge.disconnected .status-indicator-dot {
 background: #dc3545;
}

.live-status-badge.disconnected .status-text {
    color: #721c24;
}

.status-indicator-dot {
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-text {
    font-weight: 600;
    color: #155724;
    font-size: 0.9rem;
}

/* Three Column Activity Grid */
.three-column-activity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
 gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Activity Card - Universal Styling */
.activity-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
display: flex;
    flex-direction: column;
    height: 600px; /* Fixed height for all cards */
}

.card-header-section {
display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    background: #fafafa;
    flex-shrink: 0;
}

.card-header-left {
    display: flex;
align-items: center;
    gap: 0.75rem;
}

.linkedin-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
 align-items: center;
    justify-content: center;
  flex-shrink: 0;
}

.linkedin-logo {
    width: 100%;
  height: 100%;
    object-fit: contain;
}

.email-icon-wrapper {
    width: 32px;
 height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.outlook-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-title {
    display: flex;
 align-items: center;
    gap: 0.5rem;
 font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.card-title i {
    font-size: 18px;
}

.card-content-body {
    padding: 1rem;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* LinkedIn Unified List - Single Scrollable Area */
.linkedin-unified-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.5rem;
}

.linkedin-unified-list::-webkit-scrollbar {
    width: 6px;
}

.linkedin-unified-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.linkedin-unified-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.linkedin-unified-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.linkedin-activity-item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.6rem;
    background: #f8f9fa;
 border-radius: 4px;
  transition: all 0.2s;
    animation: slideDown 0.3s ease-out;
}

.linkedin-activity-item.new-item {
    animation: highlightFade 1s ease-out;
  background: #e7f3ff;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
      opacity: 1;
        transform: translateY(0);
    }
}

@keyframes highlightFade {
    0% {
   background: #cfe2ff;
     transform: scale(1.02);
 }
    100% {
   background: #e7f3ff;
 transform: scale(1);
    }
}

.linkedin-activity-item:hover {
    background: #e9ecef;
}

.linkedin-activity-item .chat-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
 align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.linkedin-activity-item .linkedin-activity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e9ecef;
}

.email-lead-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.email-lead-cell .email-lead-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e9ecef;
}

.email-lead-cell span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-text-content {
    flex: 1;
    font-size: 0.85rem;
  color: #495057;
    line-height: 1.4;
}

.activity-text-content strong {
    color: #333;
    font-weight: 600;
}

.activity-text-content a {
color: #0077b5;
    text-decoration: none;
    font-weight: 600;
}

.activity-text-content a:hover {
    text-decoration: underline;
}

.linkedin-post-icon {
 font-size: 24px;
    color: #0077b5;
    flex-shrink: 0;
    margin-top: 2px;
}

.empty-state-small {
  padding: 2rem 1rem;
    text-align: center;
 color: #6c757d;
    font-size: 0.85rem;
}

/* Email Card Styling */
.email-table-wrapper {
    flex: 1;
    overflow-y: auto;
}

.email-table-compact {
  width: 100%;
    border-collapse: collapse;
}

.email-table-compact thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.email-table-compact th {
 padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.7rem;
  text-transform: uppercase;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

.email-table-compact td {
    padding: 0.6rem 0.5rem;
    font-size: 0.8rem;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.email-table-compact tbody tr {
    transition: all 0.3s ease-out;
    animation: slideDown 0.3s ease-out;
}

.email-table-compact tbody tr.new-row {
    animation: highlightFade 1s ease-out;
    background: #e7f3ff;
}

.email-table-compact tbody tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 0.25rem 0.5rem;
 font-weight: 600;
    font-size: 0.7rem;
    border-radius: 3px;
}

.status-sent {
    background-color: #d4edda;
    color: #155724;
}

.empty-cell {
    text-align: center;
    padding: 2rem !important;
}

.card-footer-summary {
    padding: 0.75rem 1rem;
    background: #e7f3ff;
    border-radius: 4px;
margin-top: 1rem;
 font-weight: 600;
    color: #004085;
    font-size: 0.85rem;
    text-align: center;
    flex-shrink: 0;
}

/* Chat Card Styling */
.chat-list-wrapper {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.chat-list-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-list-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.chat-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Queue Filters Section */
.queue-filters-section {
    display: flex;
  align-items: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.queue-filters-left {
  display: flex;
 gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.queue-filters-right {
    display: flex;
    gap: 0.5rem;
}

.filter-dropdown-btn {
    font-size: 0.8rem !important;
    height: 32px !important;
 padding: 0 0.75rem !important;
}

.filter-pill-btn {
    font-size: 0.75rem !important;
    height: 28px !important;
    padding: 0 0.75rem !important;
 border-radius: 14px !important;
    transition: all 0.2s !important;
}

.filter-pill-btn.e-primary {
    background: #0d6efd !important;
    border-color: #0d6efd !important;
  color: white !important;
}

/* New Chat Interaction Item Design */
.chat-interaction-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: slideDown 0.3s ease-out;
    position: relative;
}

.chat-interaction-item.new-chat {
    animation: highlightFade 1s ease-out;
    background: #fffbf0;
    border-color: #ffc107;
}

/* Styling for taken over chats */
.chat-interaction-item.chat-taken-over {
    background: #f0f8ff;
    border-color: #0d6efd;
    border-left-width: 4px;
}

.chat-interaction-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Green status indicator on left */
.chat-status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    flex-shrink: 0;
 margin-top: 4px;
}

.chat-status-indicator.inactive {
    background: #dc3545;
}

/* Left section: Avatar and buttons stacked */
.chat-left-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Avatar with label below */
.chat-avatar-wrapper {
    display: flex;
flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

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

.chat-avatar-circle {
width: 40px;
    height: 40px;
    border-radius: 50%;
 display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.chat-avatar-label {
  font-size: 0.65rem;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.avatar-purple { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.avatar-orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.avatar-green { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); }

/* Chat content section - full width on right */
.chat-content-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-message-text {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-lead-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
}

.chat-message-preview {
  font-size: 0.8rem;
  color: #6c757d;
    overflow: hidden;
text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-meta-row {
    display: flex;
align-items: center;
  gap: 0.5rem;
}

.chat-timestamp {
    font-size: 0.75rem;
  color: #999;
}

.chat-new-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #ffc107;
    color: #000;
    font-size: 0.7rem;
    font-weight: 700;
border-radius: 3px;
    text-transform: uppercase;
}

/* Action buttons section - stacked vertically */
.chat-actions-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    width: 100%;
}

.chat-action-btn {
    font-size: 0.75rem !important;
    height: 32px !important;
    padding: 0 1rem !important;
    white-space: nowrap;
    width: 100%;
    justify-content: center;
}

.chat-action-btn i {
  font-size: 0.85rem;
    margin-right: 0.25rem;
}

/* Old styles for backward compatibility - can be removed if not needed */
.chat-item-compact {
  padding: 0.75rem;
    border-left: 3px solid #0d6efd;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.2s;
    animation: slideDown 0.3s ease-out;
}

.chat-item-compact.new-chat {
    animation: highlightFade 1s ease-out;
    background: #e7f3ff;
    border-left-color: #0d6efd;
    border-left-width: 4px;
}

.chat-item-compact:hover {
    background: #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chat-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

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

.chat-lead-name-compact {
    font-weight: 600;
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 0.25rem;
  overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-responded {
    background: #d4edda;
 color: #155724;
}

.status-waiting {
    background: #fff3cd;
    color: #856404;
}

.chat-input-compact {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.chat-input-field {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.8rem;
}

.chat-input-field:focus {
 outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.1);
}

.chat-send-button {
    padding: 0.4rem 0.8rem;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
justify-content: center;
}

.chat-send-button:hover {
    background: #0b5ed7;
}

.chat-send-button i {
    font-size: 12px;
}

/* Statistics Cards Grid */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card-box:hover {
 transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-label-text {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value-large {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0d6efd;
}

/* Info Banner */
.info-alert-banner {
    background: #e7f3ff;
    border-left: 4px solid #0d6efd;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.info-icon {
    font-size: 1.25rem;
    color: #0d6efd;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .activity-card {
  height: 550px;
    }
}

@media (max-width: 1200px) {
  .three-column-activity-grid {
   grid-template-columns: 1fr;
        gap: 1rem;
    }

  .activity-card {
        height: auto;
     min-height: 400px;
 }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .live-activity-page {
        padding: 1rem;
    }

    .page-header-bar {
        flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
  }

    .header-actions {
width: 100%;
        justify-content: space-between;
     flex-wrap: wrap;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .stat-value-large {
        font-size: 2rem;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
}

/* Card Overrides for Syncfusion */
.e-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border-radius: 8px;
}

.e-card .e-card-header {
    padding: 0;
}

.e-card .e-card-content {
    padding: 0;
}
