/* =========================================================
   STATUS DE FUNCIONAMENTO NA NAVBAR
   ANDREIA PESSOA CONFEITARIA
========================================================= */

.navbar-actions .loja-status {
  position: relative;
  z-index: 1060;
  flex: 0 0 auto;
  font-family: "Poppins", sans-serif;
}

.loja-status-botao {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 154px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid #eadde1;
  border-radius: 15px;
  color: #663440;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(85, 43, 54, 0.08);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.loja-status-botao:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 28px rgba(85, 43, 54, 0.12);
}

.loja-status-botao:focus-visible {
  outline: 3px solid rgba(229, 101, 144, 0.2);
  outline-offset: 2px;
}

.loja-status-icone {
  position: relative;
  display: inline-flex;
  flex: 0 0 31px;
  align-items: center;
  justify-content: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  font-size: 0.86rem;
  transition:
    color 0.2s ease,
    background-color 0.2s ease;
}

.loja-status-texto {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.2;
}

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

.loja-status-texto strong {
  color: inherit;
  font-size: 0.7rem;
  font-weight: 600;
}

.loja-status-texto small {
  color: #917e84;
  font-size: 0.56rem;
  font-weight: 400;
}

.loja-status-seta {
  flex: 0 0 auto;
  color: #a18c92;
  font-size: 0.65rem;
  transition: transform 0.2s ease;
}

.loja-status-seta[hidden] {
  display: none;
}

.loja-status-botao[aria-expanded="true"] .loja-status-seta {
  transform: rotate(180deg);
}

.loja-status-sem-horarios {
  cursor: default;
}

.loja-status-sem-horarios:hover {
  transform: none;
}

/* Loja aberta */

.loja-status-aberta .loja-status-botao {
  border-color: #b9dfc8;
  color: #276f48;
  background: linear-gradient(135deg, #f4fcf7 0%, #ffffff 100%);
  box-shadow:
    0 8px 24px rgba(47, 138, 87, 0.1),
    inset 3px 0 0 #4ba670;
}

.loja-status-aberta .loja-status-icone {
  color: #2f8a57;
  background: #dff4e8;
}

.loja-status-aberta .loja-status-texto small {
  color: #5b8a70;
}

/* Loja fechada */

.loja-status-fechada .loja-status-botao {
  border-color: #efccd6;
  color: #9d4059;
  background: linear-gradient(135deg, #fff4f7 0%, #ffffff 100%);
  box-shadow:
    0 8px 24px rgba(198, 79, 105, 0.1),
    inset 3px 0 0 #d86181;
}

.loja-status-fechada .loja-status-icone {
  color: #c64f69;
  background: #ffe2ea;
}

/*
 * O ponto vermelho comunica pausa sem repetir o desenho de
 * cadeado usado pela sacola e pelos botões de compra.
 */
.loja-status-fechada .loja-status-icone::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #d34f70;
  box-shadow: 0 2px 6px rgba(157, 64, 89, 0.28);
}

.loja-status-fechada .loja-status-texto small {
  color: #a86779;
}

/* Carregando ou sem comunicação */

.loja-status-carregando .loja-status-botao,
.loja-status-indisponivel .loja-status-botao {
  border-color: #efdfc8;
  color: #99652d;
  background: linear-gradient(135deg, #fff9ef 0%, #ffffff 100%);
  box-shadow:
    0 8px 24px rgba(183, 120, 50, 0.08),
    inset 3px 0 0 #dca45e;
}

.loja-status-carregando .loja-status-icone,
.loja-status-indisponivel .loja-status-icone {
  color: #b77832;
  background: #fff0d9;
}

.loja-status-carregando .loja-status-icone i {
  animation: loja-status-girar 1s linear infinite;
}

/* Painel de horários */

.loja-status-popover {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  width: 330px;
  padding: 16px;
  border: 1px solid #eddce2;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 55px rgba(75, 37, 47, 0.18);
  backdrop-filter: blur(14px);
  animation: loja-status-aparecer 0.2s ease;
}

.loja-status-popover::before {
  position: absolute;
  top: -7px;
  right: 28px;
  width: 13px;
  height: 13px;
  border-top: 1px solid #eddce2;
  border-left: 1px solid #eddce2;
  background: #ffffff;
  content: "";
  transform: rotate(45deg);
}

.loja-status-popover[hidden] {
  display: none;
}

.loja-status-popover-cabecalho {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1e4e8;
}

.loja-status-popover-icone {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: #d15178;
  background: #fff0f5;
  font-size: 0.9rem;
}

.loja-status-popover-cabecalho div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.loja-status-popover-cabecalho strong {
  color: #63313e;
  font-size: 0.78rem;
  font-weight: 600;
}

.loja-status-popover-cabecalho small {
  color: #97858a;
  font-size: 0.61rem;
}

.loja-status-horarios-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding-top: 12px;
}

.loja-status-dia {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #f0e4e8;
  border-radius: 11px;
  background: #fffafb;
}

.loja-status-dia:last-child {
  grid-column: 1 / -1;
}

.loja-status-dia strong {
  color: #693643;
  font-size: 0.62rem;
  font-weight: 600;
}

.loja-status-dia span {
  color: #8b767c;
  font-size: 0.58rem;
}

.loja-status-dia-fechado {
  background: #f9f5f6;
  opacity: 0.75;
}

.loja-status-dia-fechado span {
  color: #ad7e8a;
}

/* Botões de compra quando a loja estiver fechada */

.btn-product-cart.loja-fechada,
#btnAdicionarModalCarrinho.loja-fechada {
  border-color: #e8d8dd !important;
  color: #9b858c !important;
  background: #f4edef !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 1 !important;
}

@keyframes loja-status-girar {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loja-status-aparecer {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

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

/* =========================================================
   RESPONSIVO
========================================================= */

@media (max-width: 1199.98px) {
  .loja-status-botao {
    width: 132px;
  }

  .loja-status-texto strong {
    font-size: 0.65rem;
  }

  .loja-status-texto small {
    font-size: 0.52rem;
  }
}

@media (max-width: 991.98px) {
  .loja-status-botao {
    justify-content: flex-start;
    gap: 6px;
    width: 116px;
    min-height: 44px;
    padding: 5px 7px;
    border-radius: 14px;
  }

  .loja-status-icone {
    flex-basis: 27px;
    width: 27px;
    height: 27px;
    border-radius: 8px;
    font-size: 0.76rem;
  }

  .loja-status-texto {
    display: flex;
    gap: 0;
  }

  .loja-status-texto strong {
    font-size: 0.58rem;
  }

  .loja-status-texto small {
    font-size: 0.47rem;
  }

  /* No celular a mensagem permanece curta e sempre visível. */
  .loja-status-fechada .loja-status-texto small {
    font-size: 0;
  }

  .loja-status-fechada .loja-status-texto small::after {
    content: "Pedidos pausados";
    font-size: 0.47rem;
  }

  .loja-status-seta {
    display: none;
  }

  .loja-status-popover {
    right: -96px;
    width: min(330px, calc(100vw - 24px));
  }

  .loja-status-popover::before {
    right: 111px;
  }
}

@media (max-width: 419.98px) {
  .loja-status-botao {
    gap: 5px;
    width: 105px;
    min-height: 40px;
    padding: 4px 6px;
    border-radius: 13px;
  }

  .loja-status-icone {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
  }

  .loja-status-texto strong {
    font-size: 0.54rem;
  }

  .loja-status-texto small,
  .loja-status-fechada .loja-status-texto small::after {
    font-size: 0.44rem;
  }

  .loja-status-popover {
    right: -92px;
    padding: 14px;
  }

  .loja-status-horarios-grid {
    gap: 6px;
  }

  .loja-status-dia {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loja-status-botao,
  .loja-status-seta,
  .loja-status-popover {
    animation: none;
    transition: none;
  }
}