/* 
 * messenger.css - Styles for the Messenger Component
 * This file contains all styles related to the messenger section
 */

 :root {
    --transition-speed: 0.3s;
    --green-progress: #28a745;
    --primary-color: #007bff;
    --border-color: #f0f0f0;
    --text-color: #333;
    --secondary-text: #666;
    --light-bg: #f5f5f7;
    --sidebar-width: 280px;
  }
  
  
  /* Messenger Container */
  .messenger-container {
    display: flex;
    height: calc(100vh - 80px); /* Adjust based on your top header height */
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0;
  }
  
  /* Messenger Sidebar (Contact List) */
  .messenger-sidebar {
    width: 300px;
    height: 100%;
    border-right: 1px solid var(--border-color);
    background-color:#ECEAEA;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
  }
  
  /* Messenger Header */
  .messenger-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background-color:#D0D0D0;
  }
  
  .messenger-title h2 {
    font-size: 18px;
    font-weight: bolder;
    margin: 0;
    color: var(--text-color);

  }
  
  .messenger-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .messenger-icon i {
    font-size: 20px;
    color: var(--secondary-text);
    font-weight: bolder;
  }
  
  /* Messenger Search */
  .messenger-search {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: black;
  }
  
  .search-wrapper {
    background-color: var(--light-bg);
    border-radius: 20px;
    padding: 0px 15px;
    display: flex;
    align-items: center;
  }
  
  .search-icon {
    color: var(--secondary-text);
    font-size: 14px;
    margin-right: 10px;
  }
  
  .search-input {
    background: transparent;
    border: none;
    flex-grow: 1;
    font-size: 14px;
    color: var(--text-color);
    outline: none;
  }
  
  /* Contacts List */
  .contacts-list {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #f5f5f5;
  }
  
  /* Hide scrollbar but allow scrolling */
  .contacts-list::-webkit-scrollbar {
    width: 6px;
  }
  
  .contacts-list::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .contacts-list::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
  }
  
  /* Contact Item */
  .contact-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    background-color: #fff;
  }
  
  .contact-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
  }
  
  .contact-item.active {
    background-color: #f0f4f9;
  }
  
  .contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
  }
  
  .contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .contact-info {
    flex-grow: 1;
    overflow: hidden;
  }
  
  .contact-name {
    font-weight: bolder;
    color: var(--text-color);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .contact-message {
    color: var(--secondary-text);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
  }
  
  .contact-time {
    color: #999;
    font-size: 11px;
    margin-top: 4px;
  }
  
  .contact-star {
    display: flex;
    align-items: center;
    color: #ccc;
    font-size: 14px;
    padding-left: 8px;
  }
  
  .contact-star.active {
    color: #ffc107;
  }
  
  /* Messenger Chat Area */
  .messenger-chat {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background-color: #f5f5f5;
    position: relative;
  }
  
  /* Chat Header - Desktop */
  .chat-header {
    padding: 10px 20px;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    height: 60px;
  }
  
  .chat-user-info {
    display: flex;
    align-items: center;
  }
  
  .chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
  }
  
  .chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .chat-name {
    font-weight: 600;
    font-size: 16px;
    color: white;
  }
  
  .chat-actions {
    display: flex;
    gap: 15px;
  }
  
  .massenger_icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
  }
  
  /* Chat Header - Mobile */
  .chat-header-mobile {
    padding: 10px 15px;
    background-color:#D0D0D0;
  
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
  }
  
  .chat-header-mobile .contact-name {
       
    color:black;
    font-weight: bolder;
    
  }
  .chat-header-user {
    display: flex;
    align-items: center;
  }
  
  .back-button {
    font-size: 16px;
    cursor: pointer;
    margin-right: 15px;
  }
  
  .chat-menu {
    font-size: 16px;
    cursor: pointer;
  }
  
  /* Chat Messages Area */
  .chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  
  /* Empty chat message */
  .empty-chat-message {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    text-align: center;
  }
  
  /* Chat Input Area */
  .chat-input-area {
    padding: 15px 20px;
    background-color: #fff;
    border-top: 1px solid var(--border-color);
  }
  
  .chat-input-container {
    display: flex;
    align-items: center;
    background-color: #D9D9D9;
    border-radius: 30px;
    padding: 5px 5px 5px 20px;
   
  }
  
  .chat-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    outline: none;
    font-size: 14px;
    color: black;
  }
  
  .send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #D9D9D9 ;
    color: black;
    border: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  /* Search in Header */
  .search-container {
    max-width: 280px;
    flex-grow: 1;
  }
  
  .search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 0 15px;
  }
  
  .search-icon-left {
    color: var(--secondary-text);
    font-size: 14px;
    margin-right: 8px;
  }
  
  /* Responsive Styles */
  @media (max-width: 991px) {
    .messenger-sidebar {
      width: 260px;
    }
  }
  
  @media (max-width: 767px) {
    .messenger-container {
      height: calc(100vh - 56px); /* Adjust for mobile header */
      border-radius: 0;
    }
   
    
    .messenger-sidebar {
      width: 100%;
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      z-index: 1;
      transition: transform var(--transition-speed) ease;
    }
    
    .messenger-sidebar.hidden {
      transform: translateX(-100%);
    }
    
    .messenger-chat {
      width: 100%;
      z-index: 0;
    }
    
    .chat-header-mobile {
      display: flex;
    }
    
    .chat-header {
      display: none;
    }
  }
  
  /* Dark Mode Styles */
  body.dark-mode .messenger-container {
    background-color: #1e1e1e;
  }
  
  body.dark-mode .messenger-sidebar {
    background-color: #1e1e1e;
    border-right-color: #333;
  }
  
  body.dark-mode .messenger-header {
    border-bottom-color: #333;
  }
  
  body.dark-mode .messenger-title h2 {
    color: #e0e0e0;
  }
  
  body.dark-mode .messenger-icon i {
    color: #aaa;
  }
  
  body.dark-mode .search-wrapper {
    background-color: #333;
  }
  
  body.dark-mode .search-icon,
  body.dark-mode .search-icon-left {
    color: #aaa;
  }
  
  body.dark-mode .search-input {
    color: #e0e0e0;
  }
  
  body.dark-mode .search-input::placeholder {
    color: #aaa;
  }
  
  body.dark-mode .contacts-list {
    background-color: #262626;
  }
  
  body.dark-mode .contact-item {
    background-color: #1e1e1e;
    border-bottom-color: #333;
  }
  
  body.dark-mode .contact-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  body.dark-mode .contact-item.active {
    background-color: #2d2d2d;
  }
  
  body.dark-mode .contact-name {
    color: #e0e0e0;
  }
  
  body.dark-mode .contact-message {
    color: #aaa;
  }
  
  body.dark-mode .contact-time {
    color: #888;
  }
  
  body.dark-mode .messenger-chat {
    background-color: #262626;
  }
  
  body.dark-mode .chat-header,
  body.dark-mode .chat-input-area {
    background-color: #1e1e1e;
    border-color: #333;
  }
  
  body.dark-mode .chat-name {
    color: #e0e0e0;
  }
  
  body.dark-mode .icon-btn {
    color: #aaa;
  }
  
  body.dark-mode .chat-input-container {
    background-color: #333;
  }
  
  body.dark-mode .chat-input {
    color: #e0e0e0;
  }
  
  body.dark-mode .empty-chat-message {
    color: #888;
  }
  
  body.dark-mode .contacts-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
  }