/* Atomicamente Mobile v1 — somente cabecalhos autenticados, <= 640px.
   Nao altera grids, provas, modais, laboratorio ou layouts desktop. */
@media (max-width: 640px) {
  .header-site.atomic-mobile-header {
    box-sizing: border-box !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1200 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 7px 12px !important;
    min-height: 56px !important;
    width: 100% !important;
  }
  .header-site.atomic-mobile-header > .nav-container {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  .header-site.atomic-mobile-header .marca {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 6px !important;
    overflow: hidden !important;
    text-decoration: none !important;
  }
  .header-site.atomic-mobile-header .marca img {
    width: 27px !important;
    height: 27px !important;
    object-fit: contain !important;
    flex: 0 0 27px !important;
  }
  .header-site.atomic-mobile-header .marca > span:first-of-type {
    min-width: 0 !important;
    font-size: 0.99rem !important;
    font-weight: 800 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  /* O titulo da pagina continua dentro do conteudo; dispensamos apenas o badge no header. */
  .header-site.atomic-mobile-header .marca > span:not(:first-of-type) {
    display: none !important;
  }
  .header-site.atomic-mobile-header .nav-actions {
    position: relative !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    scrollbar-width: auto !important;
  }
  .header-site.atomic-mobile-header .nav-actions > .btn-meu-perfil,
  .header-site.atomic-mobile-header .nav-actions > .msg-btn-wrap,
  .header-site.atomic-mobile-header .nav-actions > .atomic-more-trigger {
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
  }
  .header-site.atomic-mobile-header .nav-actions .btn-meu-perfil img {
    max-width: 100% !important;
    max-height: 100% !important;
  }
  .header-site.atomic-mobile-header .nav-actions > .msg-btn-wrap .msg-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
  .header-site.atomic-mobile-header .atomic-more-trigger {
    border: 1px solid var(--borda, #ddd6fe) !important;
    background: var(--roxo-claro, #f1eaff) !important;
    color: #7c3aed !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 11px !important;
    padding: 0 !important;
    cursor: pointer !important;
    touch-action: manipulation;
  }
  .header-site.atomic-mobile-header .atomic-more-trigger svg { width: 20px; height: 20px; }
  .header-site.atomic-mobile-header .atomic-more-trigger:focus-visible { outline: 2px solid #7c3aed; outline-offset: 3px; }
  .header-site.atomic-mobile-header .atomic-more-panel {
    position: absolute !important;
    right: 0 !important;
    top: calc(100% + 12px) !important;
    z-index: 1300 !important;
    box-sizing: border-box !important;
    width: min(294px, calc(100vw - 24px)) !important;
    max-height: calc(100dvh - 80px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding: 12px !important;
    background: var(--bg-card, var(--header-bg, #fff)) !important;
    border: 1px solid var(--borda, #e2e8f0) !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 44px rgba(27, 16, 70, .19) !important;
    -webkit-overflow-scrolling: touch;
  }
  .header-site.atomic-mobile-header .atomic-more-panel[hidden] { display: none !important; }
  .header-site.atomic-mobile-header .atomic-more-heading {
    color: var(--texto-secundario, #64748b);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 10px;
  }
  .header-site.atomic-mobile-header .atomic-overflow-entry {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 4px;
    border-top: 1px solid var(--borda, #e2e8f0);
    min-width: 0;
  }
  .header-site.atomic-mobile-header .atomic-overflow-label {
    font-size: .83rem;
    font-weight: 600;
    color: var(--texto-principal, var(--texto, #1e293b));
    flex: 1 1 auto;
  }
  .header-site.atomic-mobile-header .atomic-overflow-entry > .theme-toggle-btn {
    display: flex !important;
    flex: 0 0 38px !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
  .header-site.atomic-mobile-header .atomic-overflow-entry > a:not(.theme-toggle-btn) {
    flex: 0 1 auto;
    max-width: 100%;
    white-space: normal;
  }
  .header-site.atomic-mobile-header .atomic-overflow-entry > .menu-dropdown {
    width: 100% !important;
    position: relative !important;
  }
  .header-site.atomic-mobile-header .atomic-overflow-entry > .menu-dropdown > button {
    width: 100%;
    justify-content: space-between !important;
  }
  .header-site.atomic-mobile-header .atomic-more-panel .dropdown-conteudo {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    box-shadow: none !important;
    margin-top: 6px;
    animation: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .header-site.atomic-mobile-header * { scroll-behavior: auto !important; }
}
