.sidebar-logo{
    height: 35px;
}


.main-wrapper .page-wrapper .page-content {
    margin:0;
}

.card-chat{
    height: calc(100vh - 50px); /* Full viewport height for dynamic layout */
    
}

/* Ensure the card-body fills the card */
.card-chat .card-body {
    height: 100%;
    padding: 0; /* Remove extra padding if needed */
    display: flex;
    flex-direction: column;
    min-height: 0;  /* Allow inner children to shrink properly */
    color: #000;
    margin-top:0;
}

.chat-wrapper .card-body .row{
    height: 100%; /* Allow it to fill the card-body */
    min-height: 0;
}

.chat-content{
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100%;
    min-height: 0;
}

.chat-wrapper .chat-content .chat-body{
    overflow-y: auto;
    position: relative;
    max-height: calc(100vh - 190px);
    margin-top: 20px;
    margin-bottom: 20px;
}

#chatInput{
    display: flex;
    align-items: center;
}

.messages {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align messages to the bottom */
    margin-bottom: 0px;
}

.form-gender{
    display: flex;
    height: 38px;
    align-items: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of everything */
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 500px;
}

/* Specific styles for the chat modal to align text to the left */
#chatModal .modal-content {
    text-align: left; /* Aligns text to the left */
}

#rowDavidMuraRodriguez:hover td{
    background-color: #e4e7ec;
}

.swal2-title{
    padding-bottom: 1rem;
}

/* Ensure the audio player doesn't overflow and cause a horizontal scrollbar */
audio {
    width: 100%; /* Make the audio player take up 100% of its container */
    max-width: 100%; /* Ensure the audio element doesn't exceed the container's width */
    box-sizing: border-box; /* Include padding and border in the element's width */
    margin-top: 8px;
    margin-bottom: 8px;
}

/* For SweetAlert modal, ensure no overflow on smaller screens */
.swal2-popup {
    overflow-x: hidden; /* Hide horizontal scrolling within the SweetAlert2 popup */
}

.buttons-container{
    text-align: right;
    padding: 5px;
}

.btnSendMessage{
    min-width: 60px;
    margin: 5px;
}

.chat-wrapper .chat-content .chat-body .messages .message-item.friend .content:has(.bubble audio), 
.chat-wrapper .chat-content .chat-body .messages .message-item.friend .bubble:has(audio) {
        min-width: 500px;
}

.chat-wrapper .chat-content .chat-body .messages .message-item.friend .bubble p:has(audio) {
    display: flex;
    align-items: center;

}

.auth-side-wrapper{
    width:100%;
    height:100%;
    background-image:none;
    background-color: #000;
    background-size:cover;
}

.auth-form-wrapper, .finished-wrapper{
    margin: 0;
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 2rem!important;
    padding-bottom: 2rem!important;
    
}

.auth-form-wrapper .image-logo, .finished-wrapper .image-logo{
    width:250px;
    padding-bottom: 1.25rem!important;
}

.image-banner{
    margin-bottom: 1.25rem!important;
    max-width: 100%;
}

.auth-form-wrapper .btn, .finished-wrapper .btn {
    background-color: #9a1b1f;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: bold;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.auth-form-wrapper .text-acceder{
    max-width: 250px;
    text-align: center;
}
.auth-form-wrapper .text-listo, .finished-wrapper .text-listo{
    text-shadow: 0 0 4px #ff9090, 0 0 20px #9a1b1f;
    font-size: 1.28rem!important;
    text-align: center;
    padding-top: 0.5rem!important;
    padding-bottom: 0.5rem!important;

}
.auth-form-wrapper .btn:hover, .finished-wrapper .btn:hover {
    background-color: #D32F2F;
}

.auth-form-wrapper .button-jugar, .finished-wrapper .button-jugar{
    text-align: center;
}

.main-wrapper{

    margin: 0; /* Removes default margins */
    height: 100vh; /* Ensures the body is the full height of the viewport */
    background-image: url("/images/background-lupas.jpg");
    background-size: cover; /* Scales the background to cover the screen */
    background-position: center; /* Centers the background image */
    background-repeat: no-repeat; /* Prevents the background from repeating */
}

.chat-wrapper .chat-content .chat-body .messages .message-item{
    margin-bottom: 5px;
}

.content .message .bubble a{
    overflow-wrap: anywhere;
}

.table-ranking{
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.table-ranking .ranking-number{
    width: 50px;
}

.table-ranking .ranking-time{
    width: 120px;
}

.img-bubble{
    width: 100%;
    max-height: 400px;
    margin-top: 8px;
    margin-bottom: 8px;
}


@media (max-width: 991px) { /* Target mobile devices */
    .chat-wrapper .card-chat {
        height: 100vh; /* Make the card take the full height of the viewport */
        width: 100vw; /* Make the card take the full width of the viewport */
        margin: 0; /* Remove any margin */
        padding: 0; /* Remove any padding */
        border-radius: 0; /* Ensure no rounded corners */
    }

    .chat-wrapper .chat-content .chat-body {
        height: 100%;
        margin-top: 10px;
        margin-bottom: 0px;
        max-height: 100%;
        background-color: #FFFFFF;
    }

    .chat-wrapper .chat-content .chat-body .messages .message-item.friend .content:has(.bubble audio), 
    .chat-wrapper .chat-content .chat-body .messages .message-item.friend .bubble:has(audio) {
        min-width: 100px;
        width: 100%;
    }

    .main-wrapper {
        margin: 0; /* Ensure no margin */
        padding: 0; /* Ensure no padding */
    }

    .main-wrapper .page-wrapper .page-content {
        padding: 0;
        margin:0;
    }

    .row{
        --bs-gutter-x: 0; /* Remove horizontal gutter */
    }

    .card-body{
        padding: 5px;
    }
}

/* Optionally, make the footer sticky (always visible at the bottom) within the grid */
.chat-footer {
    position: sticky;
    bottom: 0;
    z-index: 1;
    background-color: #fff;
    padding: 5px;
    border-top: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important;
}

/* Also make the header sticky (always visible at the top) */
.chat-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #fff;
}