.header-container {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 1000;
}

.right-corner-elements {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone-icon-container {
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.phone-icon-container:hover {
    transform: scale(1.1);
}

.phone-icon {
    display: block;
}

.profile-section {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-picture-container {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.profile-picture-container:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.profile-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placeholder-icon {
    font-size: 20px;
    color: white;
}

.profile-dropdown {
    position: absolute;
    top: 60px;
    right: 0;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-button {
    background: none;
    border: none;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-button:hover {
    background-color: #f8f9fa;
}

.logout-button {
    color: #dc3545;
    border-top: 1px solid #f0f0f0;
}

.logout-button:hover {
    background-color: #ffe0e0;
}

/* Modal de Logout */
.logout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.logout-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.logout-modal-content h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.25rem;
}

.logout-modal-content p {
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.4;
}

.logout-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.logout-cancel-button {
    padding: 0.75rem 1.5rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: transparent;
    color: #333;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.logout-cancel-button:hover {
    background-color: #f0f0f0;
    border-color: #999;
}

.logout-confirm-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-color: #dc3545;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.logout-confirm-button:hover {
    background-color: #c82333;
}

/* Suporte Card */
.suporte-card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    z-index: 2000;
}

.suporte-card-container {
    position: relative;
    z-index: 2001;
    margin-top: 80px;
    margin-right: 20px;
}

.suporte-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.suporte-titulo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.suporte-subtitulo {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.contato-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

.contato-item:hover {
    background-color: #e9ecef;
}

.contato-item.clickable {
    cursor: pointer;
    background-color: #e3f2fd;
}

.contato-item.clickable:hover {
    background-color: #bbdefb;
}

.contato-info {
    display: flex;
    flex-direction: column;
}

.contato-nome {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contato-descricao {
    color: #666;
    font-size: 0.95rem;
}

.contato-item:last-child {
    margin-bottom: 0;
}

/* Chat Online */
.chat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    z-index: 3000;
}

.chat-container {
    position: relative;
    z-index: 3001;
    margin-top: 80px;
    margin-right: 20px;
}

.chat-online {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    width: 350px;
    height: 500px;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-header {
    background-color: #1e3a8a;
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-titulo {
    color: white;
    margin: 0;
    font-size: 1.1rem;
}

.fechar-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.fechar-chat:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.chat-mensagens {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #fafafa;
}

.mensagem {
    max-width: 80%;
    padding: 0.75rem;
    border-radius: 12px;
    position: relative;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mensagem.usuario {
    align-self: flex-end;
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.mensagem.suporte {
    align-self: flex-start;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.mensagem-texto {
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    line-height: 1.4;
}

.mensagem-hora {
    font-size: 0.7rem;
    opacity: 0.8;
    text-align: right;
}

.mensagem.usuario .mensagem-hora {
    color: rgba(255, 255, 255, 0.8);
}

.mensagem.suporte .mensagem-hora {
    text-align: left;
    color: #666;
}

.chat-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
    gap: 0.5rem;
    background-color: white;
    border-radius: 0 0 12px 12px;
}

.chat-campo {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
    background-color: white;
    transition: border-color 0.2s;
}

.chat-campo:focus {
    border-color: #007bff;
}

.chat-enviar {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.chat-enviar:hover {
    background-color: #0056b3;
}

/* Responsividade */
@media (max-width: 768px) {
    .header-container {
        padding: 10px 15px;
    }
    
    .right-corner-elements {
        gap: 15px;
    }
    
    .profile-picture-container {
        width: 40px;
        height: 40px;
    }
    
    .suporte-card-container,
    .chat-container {
        margin-right: 10px;
        margin-left: 10px;
    }
    
    .suporte-card,
    .chat-online {
        width: calc(100vw - 20px);
        max-width: none;
    }
}

/* permite que cliques "passem" através do header (exceto para os elementos interativos) */
.header-container {
  pointer-events: none; /* header não captura cliques */
}

/* mas permite que os controles no canto (telefone e profile) continuem clicáveis */
.phone-icon-container,
.profile-section {
  pointer-events: auto;
}

/* Garantir pointer-events nos elementos do header e overlays criados por portal */
.header-container { pointer-events: auto; }
.phone-icon-container, .profile-section { pointer-events: auto; }

/* Força que os overlays criados por portal fiquem por cima */
.logout-modal-overlay, .suporte-card-overlay, .chat-overlay {
  z-index: 110000 !important;
  pointer-events: auto !important;
}

/* Pequeno ajuste visual dos botões do modal (pode se misturar com seu CSS atual) */
.logout-cancel-button {
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
}
.logout-confirm-button {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  background: #dc3545;
  color: #fff;
  cursor: pointer;
}