/* Estilos gerais */



/* Logo */
.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    max-width: 200px;
    height: auto;
}

/* Chat container */
.chat-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f9f9f9;
    background-image: url('../img/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70% auto;
    background-blend-mode: normal;
    /* Removida a linha: opacity: 0.4; */
}

.message {
    margin-top: 15px;    /* Adicionando margem superior igual à inferior */
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    max-width: 70%;
    max-height: 100%;
    word-wrap: break-word;
}

.message.sent {
    background-color: #dcf8c6;
    margin-left: auto;
}

.message.received {
    background-color: #e0f7fa; /* Alterado de #e5e5ea (cinza) para #e0f7fa (azul claro) */
}

.message .timestamp {
    font-size: 0.7em;
    color: #888;
    text-align: right;
    margin-top: 5px;
}

.message .file-attachment {
    margin-top: 5px;
}

.message .file-attachment a {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.message img {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 5px;
}

/* Chat input */
.chat-input {
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.chat-input form {
    display: flex;
    align-items: center;
}

.file-upload {
    margin-right: 10px;
}

.file-upload input[type="file"] {
    display: none;
}

.file-upload label {
    cursor: pointer;
    padding: 8px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: inline-block;
}

#message-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#send-button {
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #3e4095;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

#send-button:hover {
    background-color: #16459c;
}

/* Empresa view */
.company-view .dashboard {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
}

.users-online, .uploads-monitor {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

.users-online h3, .uploads-monitor h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#online-users {
    list-style: none;
}

#online-users li {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

#online-users li:hover {
    background-color: #f5f5f5;
}

#online-users li.active {
    background-color: #e6f7ff;
    font-weight: bold;
}

#recent-uploads {
    max-height: 300px;
    overflow-y: auto;
}

.upload-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
}

.upload-item .filename {
    font-weight: bold;
}

.upload-item .timestamp {
    font-size: 0.8em;
    color: #888;
}

/* Login page */
.login-container {
    max-width: 90%;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-form .form-group {
    margin-bottom: 15px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.login-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-form button {
    width: 100%;
    padding: 10px;
    background-color: #3e4095;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.login-form button:hover {
    background-color: #0f5ceb;
}

.error {
    color: #f44336;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #ffebee;
    border-radius: 4px;
}

/* Header com logo e botão de sair */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    text-align: center;
}

.logout-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-left: 10px;
}

.logout-btn:hover {
    background-color: #d32f2f;
}

.upload-item .filename a {
    text-decoration: none;
    color: #333;
}

.upload-item .filename i {
    font-size: 1.5em;
    cursor: pointer;
}

.upload-item .filename i:hover {
    color: #4CAF50;
}

.upload-item a {
    text-decoration: none;
    color: #333;
}

.upload-item a i {
    font-size: 1.5em;
    cursor: pointer;
}

.upload-item a i:hover {
    color: #4CAF50;
}

.upload-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.upload-actions a {
    text-decoration: none;
    color: #333;
}

.upload-actions i {
    font-size: 1.2em;
    cursor: pointer;
}

.delete-upload {
    color: #f44336;
    margin-left: 10px;
}

.delete-upload:hover {
    color: #d32f2f;
}

/* Indicador de status do administrador */
.admin-status-indicator {
    position: fixed;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    z-index: 1000;
}

.admin-status-indicator.online {
    background-color: #4CAF50; /* Verde */
}

.admin-status-indicator.offline {
    background-color: #F44336; /* Vermelho */
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.status-badge.online {
    background-color: #4CAF50;
    color: white;
}

.status-badge.offline {
    background-color: #F44336;
    color: white;
}

/* Ajustes para compatibilidade com Bootstrap 5 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    min-height: 400px;
}

#online-users.list-group-flush .list-group-item {
    cursor: pointer;
}

#online-users.list-group-flush .list-group-item:hover {
    background-color: #f5f5f5;
}

#online-users.list-group-flush .list-group-item.active {
    background-color: #e6f7ff;
    font-weight: bold;
}

/* Ajustes para dispositivos móveis */
@media (max-width: 767.98px) {
    .chat-messages {
        min-height: 300px;
    }
    
    .users-online, .uploads-monitor {
        margin-bottom: 1rem;
    }
}


/* Estilos para estatísticas da sala */
.room-stats {
    background-color: #f8f9fa !important;
    border-left: 4px solid #007bff !important;
    margin-bottom: 10px;
}

.room-stats .fas {
    font-size: 1.1em;
}

.room-stats .fw-bold {
    font-size: 0.9em;
}

/* Animação para mudança de cor */
.room-stats span {
    transition: color 0.3s ease;
}
