/* Chat Container Styles */
.chat-room {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease;
}

.chat-room.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    scrollbar-width: thin;
    transition: height 0.3s ease;
}

.maximized .chat-messages {
    height: calc(100vh - 150px);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Message Styles */
.chat-message {
    margin-bottom: 1rem;
    max-width: 85%;
    position: relative;
}

.chat-message-left {
    margin-right: auto;
}

.chat-message-right {
    margin-left: auto;
}

.chat-content {
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chat-message-right .chat-content {
    border-bottom-right-radius: 0 !important;
    background-color: #D82D5D !important;
}

.chat-message-left .chat-content {
    border-bottom-left-radius: 0 !important;
}

/* Reply Info Styles */
.reply-info {
    border-left: 3px solid;
    padding-left: 0.5rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* Pulse Animation for Recording */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.pulse {
    animation: pulse 1.5s infinite;
    margin-right: 0.5rem;
}

.recording-status {
    font-size: 0.875rem;
}

/* Reply Preview */
.reply-preview {
    border-left: 3px solid #D82D5D !important;
}

/* Reaction Styles */
.reactions-display {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.reaction-badge {
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    margin-right: 0.25rem;
    display: inline-flex;
    align-items: center;
}

.reaction-badge .reaction-count {
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

/* Message Actions */
.message-actions {
    opacity: 1;
    font-size: 0.75rem;
}

/* Emoji Picker Customization */
emoji-picker {
    position: absolute;
    z-index: 1000;
    bottom: 50px;
    right: 0;
    --background: #fff;
    --border-color: #e0e0e0;
    --indicator-color: #D82D5D;
    --input-border-color: #ced4da;
    --input-font-color: #495057;
    --input-placeholder-color: #6c757d;
    --outline-color: #D82D5D;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Audio Player Styling */
audio {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    outline: none;
}

audio::-webkit-media-controls-panel {
    background-color: #f8f9fa;
}

audio::-webkit-media-controls-play-button {
    background-color: #D82D5D;
    border-radius: 50%;
    color: white;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .chat-message {
        max-width: 90%;
    }
    
    .chat-messages {
        height: 350px;
        padding: 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    emoji-picker {
        width: 280px;
        bottom: 60px;
    }
}

@media (max-width: 576px) {
    .chat-message {
        max-width: 95%;
    }
    
    .chat-messages {
        height: 300px;
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 0.5rem;
    }
    
    .message-actions {
        opacity: 1;
    }
    
    emoji-picker {
        width: 250px;
        right: 0;
        left: 0;
        margin: 0 auto;
    }
}

/* Maximize/Minimize Button */
.maximize-btn {
    cursor: pointer;
    color: white;
    margin-left: auto;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    z-index: 9999;
    position: relative;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.maximize-btn:hover {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.maximize-btn i {
    pointer-events: none; /* Garante que o evento de clique seja capturado pelo div pai */
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Estilos para o título elegante do chat */
.chat-title {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-title i {
    margin-right: 8px;
    font-size: 1.1em;
}

.gradient-text {
    background: linear-gradient(45deg, #ffffff, #e6f7ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
    padding: 0 2px;
    transition: all 0.3s ease;
}

.chat-title:hover .gradient-text {
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
    transform: scale(1.05);
}

/* Custom Bootstrap Overrides */
.bg-primary-light {
    background-color: rgba(216, 45, 93, 0.1);
}

.border-left {
    border-left: 3px solid;
}

.btn-close {
    font-size: 0.875rem;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 1;
}

/* Fix for Bootstrap 5 spacing */
.ml-2 {
    margin-left: 0.5rem;
}

.me-1 {
    margin-right: 0.25rem;
}

/* Estilos para o modal de denúncia */
.modal-header.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: none;
}

/* Garantir que o modal apareça mesmo quando o chat está maximizado */
.modal {
    z-index: 10000 !important;
}

.modal-backdrop {
    z-index: 9999 !important;
}

.modal-header {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    padding: 1rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    padding: 1rem;
}

.btn-danger.submit-report {
    background-color: #dc3545;
    border-color: #dc3545;
    transition: all 0.3s ease;
}

.btn-danger.submit-report:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Estilos personalizados para o WP Chat Plugin */

/* Estilos para mensagens fixas */
.chat-notice {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-weight: bold;
}

/* Estilos para mensagens de bots - removidos para tornar os bots indistinguíveis dos usuários reais */
/* Os bots agora aparecem exatamente como usuários normais */

.pinned-messages-section {
    margin-bottom: 15px;
    border: 1px solid #ffc107;
    border-radius: 8px;
    background-color: rgba(255, 248, 225, 0.5);
    padding: 10px;
}

.pinned-messages-header {
    font-weight: bold;
    color: #856404;
    margin-bottom: 10px;
    border-bottom: 1px solid #ffeeba;
    padding-bottom: 5px;
}

.pinned-messages-header i {
    margin-right: 5px;
}

.pinned-message {
    position: relative;
}

.pinned-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #856404;
    font-size: 0.8rem;
}

.admin-notice {
    border-left: 4px solid #ffc107 !important;
}

/* Estilos para o ícone de notificação */
.notification-icon {
    position: relative;
    margin-right: 10px;
    cursor: pointer;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-icon i {
    font-size: 1.1rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Send Message Button Styling */
.send-message {
    background-color: #D82D5D !important;
    color: white !important;
    border-color: #D82D5D !important;
    transition: all 0.3s ease;
}

.send-message:hover, .send-message:focus {
    background-color: #c02752 !important;
    border-color: #c02752 !important;
    box-shadow: 0 0 0 0.2rem rgba(216, 45, 93, 0.25) !important;
}

.send-message i {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Estilos responsivos para o modal */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem;
        flex-wrap: wrap;
    }
    
    .modal-footer .btn {
        margin: 0.25rem;
        flex: 1;
    }
}
