/* Customer-facing consolidation layer. Keep this file independent from staff UI. */

.hub-header--customer {
  position: sticky;
  top: 0;
  z-index: 35;
  border-bottom: 1px solid var(--hub-border);
  background: color-mix(in srgb, var(--hub-bg) 94%, transparent);
  backdrop-filter: blur(12px);
}

.hub-customer-header__inner {
  min-height: 3.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.hub-customer-header__brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: inherit;
  text-decoration: none;
  font-size: 1.05rem;
}

.hub-customer-header__brand .hub-header__icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.hub-customer-header__account {
  white-space: nowrap;
}

/* Internet belongs to Session rather than occupying the top of the food/drink menu. */
body.public-menu-page .menu-public > #internet {
  display: none !important;
}

.customer-menu-search {
  position: sticky;
  top: 4.25rem;
  z-index: 18;
  margin: 0 0 .75rem;
  padding: .55rem;
  border: 1px solid var(--hub-border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--hub-surface) 96%, transparent);
  box-shadow: 0 .35rem 1rem rgba(0,0,0,.06);
}

.customer-menu-search label {
  display: block;
  margin: 0 0 .35rem;
  font-weight: 700;
}

.customer-menu-search .hub-input {
  width: 100%;
  min-height: 2.8rem;
}

.customer-space-nav {
  position: fixed;
  right: max(.65rem, env(safe-area-inset-right));
  left: max(.65rem, env(safe-area-inset-left));
  bottom: max(.65rem, env(safe-area-inset-bottom));
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(var(--customer-nav-items, 3), minmax(0,1fr));
  gap: .35rem;
  padding: .45rem;
  border: 1px solid var(--hub-border);
  border-radius: 1.15rem;
  background: color-mix(in srgb, var(--hub-surface) 97%, transparent);
  box-shadow: 0 .7rem 2rem rgba(0,0,0,.16);
  backdrop-filter: blur(14px);
}

.customer-space-nav a,
.customer-space-nav button {
  min-height: 2.85rem;
  border: 0;
  border-radius: .8rem;
  background: transparent;
  color: var(--hub-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .45rem .5rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.customer-space-nav a.is-active,
.customer-space-nav button.is-active {
  background: var(--hub-primary);
  color: #fff;
}

.customer-space-nav__cart {
  position: relative;
}

.customer-space-nav__badge {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 .25rem;
  border-radius: 999px;
  background: var(--hub-accent);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  line-height: 1;
}

.customer-space-nav__cart[data-empty="true"] .customer-space-nav__badge {
  opacity: .45;
}

body.customer-space-nav-active #hub-main-content {
  padding-bottom: 6rem;
}

.customer-space-context {
  margin-bottom: .75rem;
}

.current-visit__header--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
}

.current-visit__header--compact .hub-section-title,
.current-visit__header--compact p {
  margin-block: .15rem;
}

.current-visit__totals--compact {
  padding-block: 1rem;
}

.current-visit__totals-summary {
  display: grid;
  gap: .22rem;
}

.current-visit__totals-summary h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--hub-muted);
}

.current-visit__totals-primary {
  font-size: 1.25rem;
}

.current-visit__totals-summary small {
  color: var(--hub-muted);
}

.current-visit__quick-actions {
  padding-block: 1rem;
}

.current-visit__quick-actions-head h2 {
  margin: 0 0 .65rem;
  font-size: 1rem;
}

.customer-visit-actions form:only-child {
  grid-column: 1 / -1;
}

.current-visit__internet-status {
  display: grid;
  gap: .55rem;
}

.current-visit__internet-status p,
.current-visit__internet-empty p {
  margin: 0;
}

.current-visit__internet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.current-visit__internet-actions form {
  margin: 0;
}

.current-visit__internet-upgrade {
  justify-self: start;
}

.current-visit__internet-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.current-visit__internet-choice {
  display: grid;
  gap: .65rem;
  padding: .9rem 0;
  border-top: 1px solid var(--hub-border);
}

.current-visit__internet-choice h3,
.current-visit__internet-choice p {
  margin: 0;
}

.current-visit__checkout {
  padding: 0;
  overflow: hidden;
}

.current-visit__checkout > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem;
}

.current-visit__checkout > summary::-webkit-details-marker {
  display: none;
}

.current-visit__checkout > summary span:first-child {
  display: grid;
  gap: .15rem;
}

.current-visit__checkout > summary small {
  color: var(--hub-muted);
}

.current-visit__checkout-body {
  display: grid;
  grid-template-columns: minmax(110px, 150px) 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--hub-border);
}

.current-visit__checkout-qr {
  width: 100%;
  height: auto;
  margin-top: 1rem;
}

.current-visit__checkout-body p {
  margin-block: .35rem;
}

@media (max-width: 480px) {
  .current-visit__checkout-body {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .current-visit__checkout-qr {
    width: min(180px, 70vw);
    justify-self: center;
  }
}

.customer-visit-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .65rem;
}

.customer-visit-actions form,
.customer-visit-actions button {
  width: 100%;
}

.customer-visit-actions__bill {
  background: var(--hub-primary);
  color: #fff;
}

.customer-order-card {
  display: grid;
  gap: .65rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--hub-border);
}

.customer-order-card:last-child {
  border-bottom: 0;
}

.customer-order-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.customer-order-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  color: var(--hub-muted);
}

.customer-order-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .25rem;
  font-size: .72rem;
  color: var(--hub-muted);
}

.customer-order-progress span {
  padding-top: .45rem;
  border-top: .28rem solid var(--hub-border);
  text-align: center;
}

.customer-order-progress span.is-done {
  border-color: var(--hub-primary);
  color: var(--hub-text);
  font-weight: 700;
}

.customer-order-progress span.is-current {
  border-color: var(--hub-accent);
  color: var(--hub-text);
  font-weight: 700;
}

.table-entry__choice-copy strong {
  font-size: 1.03rem;
}

.table-entry__choice-copy small {
  line-height: 1.5;
}

@media (max-width: 640px) {
  .hub-header--customer .hub-container {
    padding-inline: .8rem;
  }

  .hub-customer-header__account {
    padding-inline: .65rem;
  }

  .customer-menu-search {
    top: 4rem;
  }

  .current-visit__header--compact {
    align-items: flex-start;
  }

  .customer-visit-actions {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .customer-visit-actions .hub-button {
    min-height: 2.7rem;
    padding-inline: .55rem;
  }
}

@media (min-width: 900px) {
  .customer-space-nav {
    width: min(34rem, calc(100vw - 2rem));
    right: 50%;
    left: auto;
    transform: translateX(50%);
  }
}
