@keyframes dots {
  0%   { content: ""; }
  33%  { content: "."; }
  66%  { content: ".."; }
  100% { content: "..."; }
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.toast-close {
    opacity: 1 !important;
    margin-left: 10px;
    font-weight: 100;
    font-size: 1.3em;
    color: #fff
}

#chat-container {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    padding: 0px 20px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}

#top-status-typing {
    z-index: 99;
    top: 10px;
    position: fixed;
    background-color: #fff;
    width: 100%;
    left: 0px;
    border-radius: 0px 0px 10px 10px;
    box-shadow: 0px 10px 15px rgb(18 18 18 / 13%) !important;
}

#online-status {
    color: green;
    font-weight: bold;
    margin-bottom: 3px;
    margin-left: 15px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    text-transform: uppercase;
}

#typing-indicator {
    height: 15px;
    margin-bottom: 5px;
    color: #444;
    font-size: 12px;
    text-align: center;
}

#content-messages {
    flex-grow: 1;
    margin-top: 65px;
    border-bottom: 1px solid #ebdfdf;
    margin-bottom: 18px;
    overflow: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column-reverse;
}

#messages {
    padding: 5px 10px;
    font-size: 14px;
}

#dialog-type {
    color: #4b4040;
    font-size: 12px;
    width: 100%;
    text-align: center;
    left: 0;
    top: 59px;
    position: fixed;
    z-index: 1000;
    background: #ffffffad;
}

#dialog-type p {
    margin: 0px;
    width: auto;
    margin: 5px 5%;
}

#monitored-text {
    color: #807878;
    margin: 15px 0px 0px 0px;
    font-size: 12px;
    text-align: center;
}

.message-date {
    text-align: center;
    color: #807878;
    font-size: 12px;  
}

.message-container {
    width: 100%;
    margin: 5px 0;
}

.message-content {
    display: inline-block;
    padding: 5px 10px;
    font-family: Arial, sans-serif;
    font-size: 13px;
    position: relative;
}

/* Mensagens recebidas */
.message-container.left {
    text-align: left;
}

.message-content.incoming {
    background-color: #eeebeb;
    border-radius: 8px;
}

.message-content.incomingAdmin {
    background-color: #dfe9fc;
    border-radius: 8px;
}

.message-content.incoming.incomingAdmin::after {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 0;
    height: 0;
    border-width: 10px;
    border-style: solid;
    border-color: #dfe9fc transparent transparent transparent;
}

.message-content.incoming::after {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 0;
    height: 0;
    border-width: 10px;
    border-style: solid;
    border-color: #eeebeb transparent transparent transparent;
}

.message-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 3px 0 3px 0;
    color: #9b1814;
}

.message-second-title {
    color: #5a5858;
    font-size: 12px;
    font-weight: 100;
    text-transform: capitalize;
    margin: 0px;
}

.message-text {
    font-size: 14px;
    font-weight: 300;
    color: #000;
    margin: 0;
}

/* Mensagens enviadas */
.message-container.right {
    text-align: right;
}

.message-container.right .message-title {
    color: #fff!important;
}

.message-content.outgoing {
    background-color: #9b1814;
    color: #fff;
    border-radius: 8px 8px 8px 8px;
}

.message-content.outgoing .message-text {
    color: #fff;         
}

.message-content.outgoing::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 0;
    height: 0;
    border-width: 10px;
    border-style: solid;
    border-color: #9b1814 transparent transparent transparent;
}

.content-span-view {
    text-align: right;
    margin-top: 3px;
    min-width: 60px;
}

.check {
    font-size: 11px;
    color: #bbb5b5;
    margin-left: 10px;
}

.check.viewed {
    color: #b2a2a2;
}

.viewed-rotate {
    color: #dbc8c8;
    display: inline-block;
    transform: rotate(27deg);
    margin-left: -1px;
    font-weight: bold;
}

.check.sent {
    color: gray;
}

#content-input-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 30px;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 80%;
}

#mode-read{
    display: none;
    justify-content: center;
    text-align: center;
    margin-bottom: 10px;
}

#mode-read p{
    padding: 10px;
    font-size: 13px;
    margin: 0px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9b8;
}


#chatInput {
    width: 100%;
    height: 50px;
    border: 1px solid #e5d4d4;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    box-sizing: border-box;
    padding-right: 30px;
}

#send-button {
    width: 100px;
    height: 50px;
    border: 1px solid #9b1814;
    color: #fff;
    background-color: #9b1814;
    margin-left: 10px;
    border-radius: 6px;
    font-size: 14px;
}

.no-chat-active {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 15px 30px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 90%; 
    word-wrap: break-word;
}

/* Botão de opções */
.options-btn {
    background: #9b1814;
    color: #fff;
    border: none;
    border-radius: 5px;
    width: 40px;
    height: 50px;
    font-size: 24px;
    margin-right: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    text-align: center;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    
}

/* Pop-up menu */
#popup-menu {
    position: fixed;
    bottom: 80px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    padding: 10px;
    display: grid; /* Usar flexbox */
    align-items: center; /* Alinhar itens na mesma linha */
    gap: 2px; /* Espaço entre imagem e botão */
}

.popup-btn {
    background: #f9f9f9;
    border: none;
    padding: 10px 15px;
    margin: 5px 0;
    text-align: left;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.popup-btn:hover {
    background: #eee;
}

#btn-location-input {
    position: absolute;
    top: 50%;
    right: 10px; /* Ajuste para alinhar à borda direita */
    transform: translateY(-50%);
    border: none;
    background-color: transparent;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

#btn-location-input .icon_location {
    margin-right: 0px!important;
}

.icon_location {
    width: 20px;
    margin-right: 10px;
}

.hidden {
    display: none!important;
}

.location-link {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-decoration: underline;
}

.icon-message-map {
    width: 15px;
    height: 15px;
    margin-right: 7px;

}

#await-conection {
    position: fixed;
    width: 310px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px 15px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#await-conection .text-await-conection {
    width: 100%;
    display: flex;
    align-items: center;
}

.dots::after {
  content: "";
  animation: dots 2.0s steps(4, end) infinite;
}

/* Responsividade */
@media (max-width: 768px) {
    #chat-container {
        padding: 15px;
    }

    #content-messages {
        height: 60%;
    }

    .input-container {
        width: 75%;
    }

    #chatInput {
        height: 40px;
    }

    #send-button {
        width: 80px;
        height: 40px;
    }

    .options-btn {
        width: 30px;
        height: 40px;
    }

    .no-chat-active {
        font-size: 14px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    #content-messages {
        height: 50%;
    }

    .input-container {
        width: 75%;
    }

    #chatInput {
        height: 40px;
    }

    #send-button {
        width: 70px;
        height: 40px;
    }

    .options-btn {
        width: 30px;
        height: 40px;
    }
}
