/* I nuovi ordini WhatsApp (components/_order_alert e numero sulla voce WhatsApp della colonna):
   l'avviso scuro che entra dall'alto. */

/* Il numero nella colonna delle sezioni (components/_side_nav, voce WhatsApp) lo gestisce
   side_nav.css; qui solo l'avviso che entra dall'alto. */

/* L'avviso: scuro e grande per vederlo da lontano, sotto la barra in alto, sopra tutto. */
.order-alert {
  position: fixed;
  top: calc(var(--topbar-height) + 0.75rem);
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(44rem, calc(100vw - 2rem));
  padding: 1rem 1rem 1rem 1.125rem;
  border-radius: var(--radius);
  color: var(--app-on-color);
  background: var(--app-ink);
  box-shadow: 0 18px 48px rgba(5, 5, 5, 0.35);
  transform: translateX(-50%);
}

.order-alert--new {
  animation: order-alert-in 0.45s cubic-bezier(0.22, 0.8, 0.24, 1);
}

@keyframes order-alert-in {
  from {
    opacity: 0;
    transform: translate(-50%, -1rem);
  }
}

.order-alert__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--app-success);
}

.order-alert__icon .icon {
  width: 1.5rem;
  height: 1.5rem;
}

.order-alert__text {
  flex: 1;
  min-width: 0;
}

.order-alert__title {
  margin: 0;
  font-family: var(--font-family-display);
  font-size: 1.25rem;
  font-weight: 700;
}

/* Il nome del cliente intero, al massimo su due righe: è la prima cosa che l'agente cerca. */
.order-alert__detail {
  display: -webkit-box;
  margin: 0.125rem 0 0;
  overflow: hidden;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-alert__open {
  flex: none;
  color: var(--app-ink);
  background: var(--app-surface);
}

.order-alert__close {
  display: grid;
  flex: none;
  place-items: center;
  width: var(--touch);
  height: var(--touch);
  border: 0;
  border-radius: 50%;
  color: var(--app-on-color);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
}

.order-alert__close .icon {
  width: 1.125rem;
  height: 1.125rem;
}

@media (max-width: 40rem) {
  .order-alert {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .order-alert--new {
    animation: none;
  }
}
