/* =========================================================
   NOTIFICAÇÕES GLOBAIS DE PEDIDOS
   ANDREIA PESSOA CONFEITARIA
========================================================= */

/* =========================================================
   BADGE NO MENU PEDIDOS
========================================================= */

.sidebar-menu a.tem-pedidos-novos {
  padding-right: 12px;
}

.sidebar-menu a.tem-pedidos-novos::after {
  display: none;
}

.sidebar-pedidos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 25px;
  height: 25px;
  margin-left: auto;
  padding: 0 7px;
  color: #ffffff;
  background: linear-gradient(135deg, #eb73a0, #cf4d7b);
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 5px 13px rgba(207, 77, 123, 0.25);
  font-family: "Poppins", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  animation: badge-pedido-aparecer 0.28s ease;
}

.sidebar-pedidos-badge[hidden] {
  display: none;
}

.sidebar-menu a:hover .sidebar-pedidos-badge {
  color: #ffffff;
  background: #c94d7a;
}

.sidebar-menu a.active .sidebar-pedidos-badge {
  color: #c94d7a;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 5px 13px rgba(102, 48, 63, 0.18);
}

/* =========================================================
   BOTÃO DE SOM EM PEDIDOS.HTML
========================================================= */

.btn-som-pedidos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 17px;
  color: #86505e;
  background: #ffffff;
  border: 1px solid #efd7df;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(99, 48, 62, 0.07);
  font-family: "Poppins", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.btn-som-pedidos:hover {
  color: #d45180;
  background: #fff6f9;
  border-color: #ebc8d4;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(99, 48, 62, 0.11);
}

.btn-som-pedidos:focus-visible {
  outline: 3px solid rgba(223, 91, 139, 0.2);
  outline-offset: 2px;
}

.btn-som-pedidos.ativo {
  color: #ffffff;
  background: linear-gradient(135deg, #e96f9d, #d45180);
  border-color: transparent;
  box-shadow: 0 11px 24px rgba(212, 81, 128, 0.24);
}

.btn-som-pedidos.ativo:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #df628f, #c94976);
}

.btn-som-pedidos.pendente {
  color: #b46b20;
  background: #fff8ed;
  border-color: #f2d9b6;
}

.btn-som-pedidos i {
  font-size: 1rem;
}

/* =========================================================
   AVISO FLUTUANTE
========================================================= */

.container-notificacoes-pedidos {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1300;
  width: min(390px, calc(100vw - 32px));
  pointer-events: none;
}

.notificacao-novo-pedido {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 25px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 15px;
  color: #66333e;
  text-align: left;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(223, 91, 139, 0.14),
      transparent 42%
    ),
    #ffffff;
  border: 1px solid #edced8;
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(92, 46, 59, 0.2);
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  pointer-events: auto;
  animation: notificacao-pedido-entrar 0.32s ease;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

.notificacao-novo-pedido:hover {
  border-color: #e9adc1;
  transform: translateY(-2px);
  box-shadow: 0 26px 56px rgba(92, 46, 59, 0.24);
}

.notificacao-novo-pedido:focus-visible {
  outline: 3px solid rgba(223, 91, 139, 0.22);
  outline-offset: 3px;
}

.notificacao-novo-pedido.saindo {
  opacity: 0;
  transform: translateX(16px);
}

.notificacao-pedido-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: linear-gradient(135deg, #eb73a0, #cf4d7b);
  border-radius: 14px;
  box-shadow: 0 9px 20px rgba(207, 77, 123, 0.24);
  font-size: 1.12rem;
}

.notificacao-pedido-texto {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.notificacao-pedido-texto strong,
.notificacao-pedido-texto small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notificacao-pedido-texto strong {
  color: #66333e;
  font-size: 0.88rem;
  font-weight: 700;
}

.notificacao-pedido-texto small {
  color: #947d84;
  font-size: 0.7rem;
  font-weight: 400;
}

.notificacao-pedido-seta {
  color: #df5b8b;
  font-size: 1rem;
  transition: transform 0.22s ease;
}

.notificacao-novo-pedido:hover .notificacao-pedido-seta {
  transform: translateX(3px);
}

/* =========================================================
   RESPONSIVO E ACESSIBILIDADE
========================================================= */

@media (max-width: 767.98px) {
  .btn-som-pedidos {
    width: 100%;
  }

  .container-notificacoes-pedidos {
    top: 14px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .notificacao-novo-pedido {
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
  }

  .notificacao-pedido-icone {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-pedidos-badge,
  .notificacao-novo-pedido,
  .notificacao-pedido-seta,
  .btn-som-pedidos {
    animation: none;
    transition: none;
  }
}

@keyframes badge-pedido-aparecer {
  from {
    opacity: 0;
    transform: scale(0.7);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes notificacao-pedido-entrar {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}