/* Complete Professional Chat CSS with Improvements */
/* chat-sytle.css */
/* ============================= */
/* === BASIC CHAT STRUCTURE === */
/* ============================= */
.chat-icon .connect-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.chat-icon:hover .connect-text {
    transform: scale(1.05);
}

/* Update notification position for text instead of icon */
.chat-notification {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.5);
}
.chat-icon {
    position: relative;
    cursor: pointer;
    margin-right: 15px;
    transition: transform 0.2s ease;
}


.chat-icon i {
    font-size: 22px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Expandable chat popup */
.chat-popup {
    position: fixed;
    right: 20px;
    bottom: 0;
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.18);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    resize: both;
    overflow: hidden;
    max-width: 90vw;
    max-height: 90vh;
    min-width: 300px;
    min-height: 400px;
    will-change: transform;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-popup.active {
    transform: translateY(0);
}

.chat-popup.expanded {
    width: 90vw;
    height: 80vh;
    left: 5vw !important;
    top: 10vh !important;
    right: auto !important;
    bottom: auto !important;
    border-radius: 12px;
}

.chat-popup.active.expanded {
    transform: translateY(0) !important;
}

.chat-popup.minimized {
    height: 50px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

/* Class to disable transitions temporarily */
.no-transition {
    transition: none !important;
}

/* ============================= */
/* === CHAT HEADER STYLING === */
/* ============================= */

.chat-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #004c10 0%, #006517 100%);
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    cursor: move;
    position: relative;
    z-index: 10;
     display: flex;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.chat-header .actions {
    display: flex;
    align-items: center;
    height: 28px;
}

.chat-header i {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.chat-header .new-conversation-button,
.chat-header [class*="fa-plus"] {
    position: relative;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-header .actions i {
    cursor: pointer;
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Fix for header button alignment */
.chat-header .actions i,
.chat-header .actions > *,
.chat-header .new-conversation-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    width: 28px;
}


.chat-header .actions i:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.chat-header .actions i:active {
    transform: translateY(0);
}

.expand-button, .minimize-button, .restore-button, .new-conversation-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.expand-button i, .minimize-button i, .restore-button i {
    font-size: 16px;
}

.restore-button {
    display: none;
}

.chat-popup.expanded .expand-button {
    display: none;
}

.chat-popup.expanded .restore-button {
    display: flex;
}

.chat-popup.minimized .chat-body,
.chat-popup.minimized .message-input-container,
.chat-popup.minimized .file-preview {
    display: none;
}

.chat-popup.minimized .chat-header {
    border-radius: 10px 10px 0 0;
}

.chat-popup.minimized .minimize-button {
    display: none;
}

.chat-popup.minimized .restore-button {
    display: flex;
}

.back-button {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    margin-right: 10px;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ============================= */
/* === CHAT BODY STYLING === */
/* ============================= */

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fa;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.chat-body::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

.chat-popup.expanded .chat-body {
    overflow: hidden;
    padding: 0;
}

/* ============================= */
/* === CONVERSATION STYLING === */
/* ============================= */

.conversation-list {
    display: flex;
    flex-direction: column;
}

.conversation-item {
    padding: 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.conversation-item:hover {
    background-color: #f0f8f0;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.conversation-item.active {
    background-color: #e8f5e9;
    border-left: 3px solid #005714;
}

.conversation-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.conversation-details {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    font-size: 14px;
    color: #202124;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-last-message {
    font-size: 13px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.conversation-time {
    font-size: 11px;
    color: #80868b;
    margin-top: 3px;
    letter-spacing: 0.1px;
}

.conversation-unread {
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.delete-conversation {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.conversation-item:hover .delete-conversation {
    opacity: 1;
}

.delete-conversation i {
    font-size: 14px;
    color: #e74c3c;
}

.delete-conversation:hover {
    background-color: rgba(231, 76, 60, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.conversation-unread + .delete-conversation {
    right: 40px;
}

/* ============================= */
/* === MESSAGE STYLING === */
/* ============================= */

.message-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.message-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 5px;
    contain: content;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.message-list::-webkit-scrollbar {
    width: 6px;
}

.message-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.message-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

.message-item {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 16px;
    position: relative;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in-out;
    line-height: 1.4;
}

.message-item.sent {
    align-self: flex-end;
    background-color: #e6f7e6;
    border-bottom-right-radius: 5px;
    color: #202124;
    margin-right: 5px;
}

.message-item.received {
    align-self: flex-start;
    background-color: #ffffff;
    border-bottom-left-radius: 5px;
    color: #202124;
    border-left: 3px solid #005714;
    margin-left: 5px;
}

.message-sender {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #005714;
}

.message-text {
    font-size: 14px;
    word-break: break-word;
    line-height: 1.4;
    color: #202124 !important;
}

.message-time {
    font-size: 10px;
    color: #80868b;
    text-align: right;
    margin-top: 5px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    letter-spacing: 0.1px;
}

.message-status {
    display: inline-flex;
    margin-left: 5px;
    color: #80868b;
    font-size: 10px;
}

.message-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 5px;
    cursor: pointer;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease;
}

.message-image:hover {
    transform: scale(1.02);
}

.message-item.temp-message {
    opacity: 0.7;
}

.delete-message {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-item:hover .delete-message {
    opacity: 1;
}

.delete-message:hover {
    transform: scale(1.1);
    background-color: rgba(231, 76, 60, 0.1);
}

.delete-message i {
    font-size: 12px;
    color: #e74c3c;
}

/* ============================= */
/* === INPUT AREA STYLING === */
/* ============================= */

.message-input-container {
    display: flex;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 15px;
    background-color: #ffffff;
}

.message-input {
    flex: 1;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    color: #202124;
    transition: all 0.2s;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message-input:focus {
    outline: none;
    border-color: #005714;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 87, 20, 0.1);
}

.message-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 10px;
}

.message-actions label.image-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f0f8f0;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message-actions label.image-upload-label:hover {
    background-color: #e6f7e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.message-actions label.image-upload-label:active {
    transform: translateY(0);
}

.message-actions label.image-upload-label i {
    font-size: 18px;
    color: #005714;
}

.message-actions button.send-message {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #005714;
    color: white;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.message-actions button.send-message:hover {
    background-color: #004611;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.message-actions button.send-message:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-actions button.send-message i {
    font-size: 16px;
}

.message-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message-actions input[type="file"] {
    display: none;
}

/* ============================= */
/* === EXPANDED LAYOUT STYLES === */
/* ============================= */

.expanded-layout {
    display: flex;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

/* Chat sidebar */
.chat-sidebar {
    width: 300px;
    height: 100%;
    background-color: #f9f9f9;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* User profile in sidebar */
.user-profile {
    padding: 18px 15px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #004c10 0%, #006517 100%);
    color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.user-profile .user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-profile .user-info {
    flex: 1;
    overflow: hidden;
}

.user-profile .user-name,
.user-profile .user-status {
    color: #FFFFFF !important;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile .user-name {
    font-size: 15px;
    margin-bottom: 2px;
}

.user-profile .user-status {
    font-size: 12px;
    opacity: 0.9;
    font-weight: normal;
}

.user-profile .user-actions {
    margin-left: 10px;
}

.user-profile .user-actions i {
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.user-profile .user-actions i:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Conversation search */
.conversation-search {
    padding: 12px;
    position: relative;
    background-color: #f9f9f9;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 5;
}

.conversation-search input {
    width: 100%;
    padding: 10px 12px;
    padding-left: 35px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
    background-color: #ffffff;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.conversation-search input:focus {
    outline: none;
    border-color: #005714;
    box-shadow: 0 0 0 2px rgba(0, 87, 20, 0.1);
}

.conversation-search::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 22px;
    top: 22px;
    color: #888;
    font-size: 13px;
}

/* Sidebar conversation list */
.sidebar-conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.sidebar-conversation-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar-conversation-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.sidebar-conversation-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

/* Sidebar conversation items */
.sidebar-conversation-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.2s;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sidebar-conversation-item:hover {
    background-color: #f0f8f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.sidebar-conversation-item.active {
    background-color: #e3f1e3;
    border-left: 3px solid #005714;
}

.sidebar-conversation-item.active .sidebar-conversation-name,
.sidebar-conversation-item.active .sidebar-conversation-last-message {
    font-weight: bold;
    color: #005714;
}

.sidebar-conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.sidebar-conversation-details {
    flex: 1;
    min-width: 0;
}

.sidebar-conversation-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #202124;
}

.sidebar-conversation-last-message {
    font-size: 12px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-conversation-time {
    font-size: 11px;
    color: #80868b;
    position: absolute;
    top: 12px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1px 5px;
    border-radius: 10px;
}

.sidebar-conversation-unread {
    position: absolute;
    top: 30px;
    right: 10px;
    background-color: #e74c3c;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sidebar-conversation-delete {
    color: #e74c3c;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: all 0.2s ease;
}

.sidebar-conversation-item:hover .sidebar-conversation-delete {
    opacity: 1;
}

.sidebar-conversation-delete:hover {
    background-color: rgba(231, 76, 60, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.sidebar-conversation-unread + .sidebar-conversation-delete {
    top: 25px;
}

/* New conversation button in sidebar */
.new-sidebar-conversation {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 87, 20, 0.3);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.new-sidebar-conversation:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 87, 20, 0.4);
}

.new-sidebar-conversation:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 5px rgba(0, 87, 20, 0.3);
}

.new-sidebar-conversation i {
    font-size: 22px;
}

/* Empty conversation list in sidebar */
.empty-conversation-list {
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.empty-conversation-list p {
    margin-bottom: 20px;
    color: #5f6368;
    font-size: 15px;
}

.empty-conversation-list button {
    background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 87, 20, 0.2);
    transition: all 0.2s;
}

.empty-conversation-list button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 87, 20, 0.3);
}

/* Main chat area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: #f5f5f5;
}

/* Empty state for chat area */
.empty-chat-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #80868b;
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
}

.empty-chat-icon {
    font-size: 60px;
    margin-bottom: 20px;
    color: #d2d2d2;
    background-color: #eeeeee;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-chat-text {
    font-size: 16px;
    font-weight: 500;
    color: #5f6368;
}

/* Chat header in main area */
.expanded-chat-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #004c10 0%, #006517 100%);
    color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.recipient-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.recipient-info {
    flex: 1;
    overflow: hidden;
}

.recipient-name {
    font-weight: 600;
    font-size: 15px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipient-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.recipient-actions {
    display: flex;
    gap: 15px;
}

.recipient-actions i {
    color: white;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.recipient-actions i:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Message container */
.expanded-message-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f5f5f5;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23dddddd' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.expanded-message-container::-webkit-scrollbar {
    width: 6px;
}

.expanded-message-container::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.expanded-message-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

/* Message list */
.expanded-message-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Message items in expanded view */
.expanded-message-item {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.4;
}

.expanded-message-item.sent {
    align-self: flex-end;
    background-color: #e6f7e6;
    border-bottom-right-radius: 5px;
    color: #202124;
    margin-right: 5px;
}

.expanded-message-item.received {
    align-self: flex-start;
    background-color: #ffffff;
    border-bottom-left-radius: 5px;
    color: #202124;
    border-left: 3px solid #005714;
    margin-left: 5px;
}

.expanded-message-item .message-text {
    font-size: 14px;
    word-break: break-word;
    color: #202124 !important;
}

.expanded-message-item .message-time {
    font-size: 11px;
    color: #80868b !important;
    text-align: right;
    margin-top: 5px;
}

.expanded-message-item .message-image {
    max-width: 240px;
    max-height: 240px;
    border-radius: 8px;
    margin-top: 5px;
    cursor: pointer;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease;
}

.expanded-message-item .message-image:hover {
    transform: scale(1.02);
}

/* Message input in expanded view */
.expanded-message-input-container {
    display: flex;
    padding: 15px;
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.05);
}

.expanded-message-input-container .message-input {
    flex: 1;
    border: none;
    border-radius: 20px;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    background-color: #f5f5f5;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.expanded-message-input-container .message-input:focus {
    outline: none;
    border-color: #005714;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 87, 20, 0.1);
}

.expanded-message-input-container .message-actions {
    display: flex;
    align-items: center;
    margin-left: 10px;
    gap: 8px;
}

.expanded-message-input-container .send-message {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.expanded-message-input-container .send-message:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.expanded-message-input-container .send-message:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.expanded-message-input-container .image-upload-label {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f8f0;
    color: #005714;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.expanded-message-input-container .image-upload-label:hover {
    background-color: #e6f7e6;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.expanded-message-input-container .image-upload-label:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ============================= */
/* === NEW CONVERSATION VIEW === */
/* ============================= */

.new-conversation-container {
    padding: 15px;
    background-color: #f9f9f9;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.user-search {
    width: 100%;
    padding: 12px 15px;
    padding-left: 35px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    background-color: #ffffff;
    color: #202124;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    position: relative;
}

.user-search:focus {
    outline: none;
    border-color: #005714;
    box-shadow: 0 0 0 2px rgba(0, 87, 20, 0.1);
}

.new-conversation-container::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 30px;
    top: 27px;
    color: #888;
    font-size: 14px;
    z-index: 1;
}

.user-list {
    flex: 1;
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.user-list::-webkit-scrollbar {
    width: 6px;
}

.user-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.user-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

.user-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.user-item:hover {
    background-color: #f0f8f0;
    transform: translateX(3px);
}

.user-item:last-child {
    border-bottom: none;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.user-name {
    font-size: 14px;
    color: #202124;
    font-weight: 500;
}

/* Expanded new conversation view */
.expanded-new-conversation-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #004c10 0%, #006517 100%);
    color: white;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.expanded-new-conversation-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.expanded-new-conversation-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #f9f9f9;
}

.expanded-search-container {
    padding: 15px;
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

.expanded-user-search {
    width: 100%;
    padding: 12px 15px;
    padding-left: 35px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    background-color: #f9f9f9;
    transition: all 0.2s;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.expanded-user-search:focus {
    outline: none;
    border-color: #005714;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(0, 87, 20, 0.1);
}

.expanded-search-container::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    left: 30px;
    top: 27px;
    color: #888;
    font-size: 14px;
}

.expanded-user-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #f5f5f5;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f5f5f5;
}

.expanded-user-list::-webkit-scrollbar {
    width: 6px;
}

.expanded-user-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.expanded-user-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 20px;
}

.expanded-user-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background-color: #fff;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.expanded-user-item:hover {
    background-color: #e8f5e9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.expanded-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.expanded-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

/* ============================= */
/* === UTILITY STYLES === */
/* ============================= */

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #80868b;
    text-align: center;
    padding: 30px 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 20px;
    color: #d2d2d2;
    background-color: #eeeeee;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state p {
    font-size: 15px;
    margin: 5px 0;
    color: #5f6368;
}

.empty-state button {
    margin-top: 20px;
    background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.empty-state button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Loading indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #80868b;
    text-align: center;
    font-size: 14px;
    height: 100%;
}

.loading-indicator i {
    font-size: 30px;
    color: #005714;
    margin-bottom: 15px;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message */
.error-message {
    padding: 15px;
    background-color: #fdecea;
    border-left: 3px solid #e74c3c;
    color: #5f6368;
    margin: 15px;
    border-radius: 5px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* File preview */
.file-preview {
    display: flex;
    align-items: center;
    background-color: #e8f0fe;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    max-width: 100%;
    border: 1px dashed #80bdff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.file-preview img {
    max-width: 50px;
    max-height: 50px;
    border-radius: 3px;
    margin-right: 10px;
    border: 1px solid #ddd;
    object-fit: cover;
}

.file-info {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    color: #202124;
}

.remove-file {
    color: #e74c3c;
    cursor: pointer;
    margin-left: 10px;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.remove-file:hover {
    background-color: rgba(231, 76, 60, 0.1);
    transform: scale(1.1);
}

/* Image preview overlay */
.image-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1010;
    animation: fadeIn 0.2s ease;
}

.image-preview-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-preview {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
    animation: scaleIn 0.2s ease;
}

.close-preview {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-preview:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Delete confirmation dialog */
.delete-confirmation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: fadeIn 0.2s ease;
}

.delete-dialog {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    width: 320px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: scaleIn 0.2s ease;
}

.delete-dialog p {
    margin: 0 0 20px;
    font-size: 16px;
    color: #202124;
    font-weight: 500;
}

.delete-warning {
    font-size: 14px;
    color: #e74c3c;
    margin-top: 0;
    margin-bottom: 20px;
}

.delete-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.delete-actions button {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-weight: 500;
}

.cancel-delete {
    background-color: #f5f5f5;
    color: #5f6368;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cancel-delete:hover {
    background-color: #eeeeee;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.confirm-delete {
    background-color: #e74c3c;
    color: white;
    box-shadow: 0 1px 3px rgba(231, 76, 60, 0.3);
}

.confirm-delete:hover {
    background-color: #d63c2e;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.4);
}

/* Message deleting animation */
.message-item.deleting,
.conversation-item.deleting {
    opacity: 0.6;
    transition: height 0.3s ease, margin-bottom 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

/* Notification */
.notification {
    position: fixed;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 2000;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease;
    animation: slideInDown 0.3s forwards;
    font-weight: 500;
}

.notification.error {
    background-color: #fdecea;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

.notification.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* ============================= */
/* === ANIMATIONS === */
/* ============================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Draggable chat styles */
.chat-popup.dragging {
    transition: none;
    opacity: 0.95;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.chat-popup.dragging .chat-header {
    cursor: grabbing;
}

/* Resizable handle styles */
.chat-popup:not(.minimized)::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 15px;
    height: 15px;
    cursor: nwse-resize;
    background: linear-gradient(
        135deg,
        transparent 50%,
        rgba(0, 87, 20, 0.3) 50%,
        rgba(0, 87, 20, 0.5) 75%,
        rgba(0, 87, 20, 0.7) 100%
    );
    border-bottom-right-radius: 4px;
}

/* ============================= */
/* === RESPONSIVE DESIGN === */
/* ============================= */

@media (max-width: 768px) {
    .chat-popup {
        width: 100%;
        height: 100%;
        right: 0;
        left: 0 !important;
        top: 0 !important;
        bottom: 0;
        border-radius: 0;
    }
    
    .chat-header {
        border-radius: 0;
    }
    
    .message-item {
        max-width: 85%;
    }
    
    .chat-popup.expanded {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        max-width: 100vw;
        border-radius: 0;
    }
    
    .expanded-layout {
        flex-direction: column;
    }
    
    .chat-sidebar {
        width: 100%;
        height: auto;
        max-height: 30vh;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .chat-main {
        height: 70vh;
    }
}

@media (max-width: 480px) {
    .message-input-container,
    .expanded-message-input-container {
        padding: 10px;
    }
    
    .message-input,
    .expanded-message-input-container .message-input {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .message-actions button.send-message,
    .expanded-message-input-container .send-message,
    .message-actions label.image-upload-label,
    .expanded-message-input-container .image-upload-label {
        width: 32px;
        height: 32px;
    }
}

 /* Call button in message header */
        .call-actions {
            display: flex;
            gap: 8px;
            margin-left: 10px;
        }
        
        .video-call-btn, .voice-call-btn {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            color: white;
        }
        
        .video-call-btn {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
        }
        
        .voice-call-btn {
            background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
        }
        
        .video-call-btn:hover, .voice-call-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }
        
        /* Video call overlay */
        .video-call-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 2000;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        
        .video-call-container {
            position: relative;
            width: 90vw;
            height: 80vh;
            max-width: 1200px;
            border-radius: 12px;
            overflow: hidden;
            background: #1a1a1a;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
        }
        
        /* Video elements */
        .remote-video {
            width: 100%;
            height: 100%;
            object-fit: cover;
            background: #000;
        }
        
        .local-video {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 200px;
            height: 150px;
            border-radius: 8px;
            object-fit: cover;
            background: #333;
            border: 2px solid rgba(255, 255, 255, 0.1);
            z-index: 10;
        }
        
        /* Call controls */
        .call-controls {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 15px;
            z-index: 20;
        }
        
        .call-control-btn {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            color: white;
            font-size: 20px;
        }
        
        .mute-btn {
            background: rgba(255, 255, 255, 0.2);
        }
        
        .mute-btn.muted {
            background: #f44336;
        }
        
        .camera-btn {
            background: rgba(255, 255, 255, 0.2);
        }
        
        .camera-btn.disabled {
            background: #f44336;
        }
        
        .end-call-btn {
            background: #f44336;
        }
        
        .call-control-btn:hover {
            transform: scale(1.1);
        }
        
        /* Call status info */
        .call-info {
            position: absolute;
            top: 20px;
            left: 20px;
            color: white;
            z-index: 20;
        }
        
        .call-info h3 {
            margin: 0 0 5px 0;
            font-size: 18px;
        }
        
        .call-status {
            font-size: 14px;
            opacity: 0.8;
        }
        
        .call-duration {
            font-size: 12px;
            opacity: 0.6;
            margin-top: 5px;
        }
        
        /* Incoming call notification */
        .incoming-call-notification {
            position: fixed;
            top: 20px;
            right: 20px;
            width: 300px;
            background: white;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            z-index: 2001;
            display: none;
            animation: slideInRight 0.3s ease;
        }
        
        @keyframes slideInRight {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        
        .incoming-call-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }
        
        .incoming-call-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, #005714 0%, #017a1c 100%);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-right: 15px;
        }
        
        .incoming-call-info h4 {
            margin: 0 0 5px 0;
            color: #333;
        }
        
        .incoming-call-type {
            color: #666;
            font-size: 14px;
        }
        
        .incoming-call-actions {
            display: flex;
            gap: 10px;
        }
        
        .accept-call-btn, .decline-call-btn {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
            transition: all 0.2s ease;
        }
        
        .accept-call-btn {
            background: #4CAF50;
            color: white;
        }
        
        .decline-call-btn {
            background: #f44336;
            color: white;
        }
        
        .accept-call-btn:hover, .decline-call-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }
        
        /* Connection status indicators */
        .connection-status {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            text-align: center;
            z-index: 15;
        }
        
        .connection-status i {
            font-size: 48px;
            margin-bottom: 20px;
            opacity: 0.7;
        }
        
        .connection-status h3 {
            margin: 0 0 10px 0;
            font-size: 24px;
        }
        
        .connection-status p {
            margin: 0;
            opacity: 0.8;
            font-size: 16px;
        }
        
        /* Pulse animation for connecting state */
        .pulse {
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% {
                transform: translate(-50%, -50%) scale(1);
                opacity: 0.7;
            }
            50% {
                transform: translate(-50%, -50%) scale(1.1);
                opacity: 1;
            }
            100% {
                transform: translate(-50%, -50%) scale(1);
                opacity: 0.7;
            }
        }
        
        /* Mobile responsive */
        @media (max-width: 768px) {
            .video-call-container {
                width: 100vw;
                height: 100vh;
                border-radius: 0;
            }
            
            .local-video {
                width: 120px;
                height: 90px;
                top: 10px;
                right: 10px;
            }
            
            .call-controls {
                bottom: 20px;
            }
            
            .call-control-btn {
                width: 45px;
                height: 45px;
                font-size: 18px;
            }
            
            .incoming-call-notification {
                width: calc(100% - 40px);
                right: 20px;
                left: 20px;
            }
        }