/* Base Styles */
.call-overlay {
    position: fixed;
    top: 10%;
    left: 10%;
    width: 60%;
    height: 80%;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    color: white;
}

/* Audio Call Specific */
.call-overlay.audio-call {
    background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
}

/* Video Call Specific */
.call-overlay.video-call {
    background-color: #1e1e1e;
}

.call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 16px;
}

.call-header-info-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.call-title {
    font-weight: 500;
}

#call-username {
    font-weight: 600;
    color: #4dabf7;
}

.muted-icon i {
    color: #e03131;
    font-size: 16px;
}


#call-timer {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.call-actions {
    display: flex;
    gap: 8px;
}

.call-body {
    flex: 1;
    position: relative;
}

.remote-video,
.local-video {
    position: absolute;
}

.remote-video {
    width: 100%;
    height: 100%;
}

.local-video {
    width: 30%;
    max-width: 160px;
    aspect-ratio: 16/9;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: #000;
    overflow: hidden;
}

#call-info-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

#avatar-profile-picture {
    width: 216px;
    height: 216px;
    object-fit: cover;
    border-radius: 50%;
}

@media (max-width: 600px) {
    #avatar-profile-picture {
        width: 128px;
        height: 128px;
    }
}

.user-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4dabf7, #228be6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

/* No Participants Message Styles */
#waiting-text-container {
    text-align: center;
    color: white;
}

#waiting-text-container p {
    font-size: 18px;
    margin: 0;
}

.call-controls {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.2);
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.control-btn.end-call {
    background-color: #ff4d4d;
}

.control-btn.end-call:hover {
    background-color: #ff3333;
}

.control-btn .control-icon {
    font-size: 1.3rem;
    color: white;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hidden {
    display: none !important;
}

/* Fullscreen Mode */
.call-overlay.fullscreen {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* Video Elements */
#remoteVideo video,
#localVideo video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Mini preview */
.call-overlay.video-call #localVideo video {
    object-fit: cover !important;
}

/* Active states */
.control-btn.active {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Hide Vonage default placeholders */
.OT_video-poster,
.OT_video-placeholder {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    background-image: none !important;
}

/* Custom placeholder styles */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.remote-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remote-placeholder .initials-display {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #4dabf7, #228be6);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.remote-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.local-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .local-placeholder {
        width: 32px;
        height: 32px;
    }
}

.local-placeholder .initials-display {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #4dabf7, #228be6);
    font-size: 20px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Call History Styling */

.modal-content {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    top: 60px;
    max-height: 92% !important;
}

.call-history-modal {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
    background-color: #fff;
}

/* Modal Header */
.call-history-modal .modal-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.call-history-modal .modal-title {
    font-weight: 600;
    color: #343a40;
    display: flex;
    align-items: center;
}

/* Modal Body */
.call-history-modal .modal-body {
    padding: 1rem;
}

/* Call History Card */
.call-history-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.call-history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.call-history-card .card-body {
    padding: 0.75rem;
    display: flex;
    align-items: center;
}

.call-history-profile-image-container {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.call-history-profile-image {
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 48px;
    height: 48px;
}

.call-history-initials {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4dabf7, #228be6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

.history-call-type-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding-left: 0.5rem;
}

.call-type-container {
    gap: 12px;
}

.call-type-container .badge {
    font-size: 0.7rem;
    padding: 0.3em 0.5em;
}

.call-type-container .badge.incoming {
    background-color: #d1e7dd;
    color: #0f5132;
}

.call-type-container .badge.outgoing {
    background-color: #cfe2ff;
    color: #084298;
}

.call-type-icon {
    font-size: 1.5rem;
    color: #25D366;
    cursor: pointer;
    transition: color 0.2s;
}

.call-type-icon.muted {
    color: #6c757d;
}

.call-type-icon:hover {
    color: #128C7E;
}

/* Empty and Error States */
.call-history-container .text-muted {
    font-size: 1rem;
}

.call-history-container .fs-1 {
    color: #6c757d;
}

/* Close Button */
.call-history-modal .btn-close {
    filter: invert(0.5);
    transition: filter 0.2s;
}

.call-history-modal .btn-close:hover {
    filter: invert(0.3);
}

/* Modal Animation */
@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .call-history-modal .modal-dialog {
        margin: 0.5rem;
    }

    .call-history-card .card-body {
        padding: 0.75rem;
    }

    .call-history-profile-image-container,
    .call-history-profile-image,
    .call-history-initials {
        width: 40px;
        height: 40px;
    }

    .call-history-initials {
        font-size: 1rem;
    }

    .call-type-icon {
        font-size: 1.25rem;
    }
}

.modal-sm {
    max-width: 360px;
    /* Narrow width similar to WhatsApp */
    margin-left: auto;
    margin-right: auto;
}

.no-hover {
    background-color: transparent;
    border: 1px solid #ced4da;
    /* Keep border if needed */
    color: #6c757d;
}

.no-hover-effect:hover,
.no-hover-effect:focus {
    background-color: transparent !important;
    box-shadow: none !important;
}

.custom-group-user-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid #ced4da;
}

.fs-reomte-user {
    font-size: 3rem;
}
.profile-wrapper {
    width: 45px;
    height: 45px;
    position: relative;
}

.status-overlay-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.dot-online {
    background-color: #28a745;
}

.dot-offline {
    background-color: #666; 
}
.min-w-max-content {
  min-width: max-content;
}