/* "Choose a menu" step (Views/Public/Menus.cshtml) — the screen between picking a
   restaurant and browsing its meals. Deliberately echoes restaurant-directory.css's hero +
   ring-card language (.mp-* here, not .rd-*) since it's the very next step in the same
   funnel and should feel like a continuation, not a different app.

   Unlike the restaurant directory, this page already runs inside one restaurant's own
   brand (--primary-color etc. are set by _Layout.cshtml from that restaurant's theme), so
   the hero automatically matches whatever the owner picked — no color choices made here. */

.mp-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--primary-color) 94%, black) 0%,
    var(--primary-color) 100%
  );
  color: var(--color-on-primary);
  padding: 2rem 1rem 3.5rem;
  text-align: center;
}

.mp-hero::before {
  content: "";
  position: absolute;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: #ffffff;
  opacity: 0.12;
  filter: blur(10px);
  top: -7rem;
  inset-inline-end: -4rem;
  pointer-events: none;
}

.mp-hero__back {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--color-on-primary);
  opacity: 0.85;
  margin-bottom: 1.25rem;
  min-height: 24px;
}
.mp-hero__back:hover {
  opacity: 1;
}
.mp-hero__back svg {
  width: 1rem;
  height: 1rem;
}

.mp-hero__logo {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  margin: 0 auto 0.9rem;
  background-color: var(--color-surface);
  border: 3px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mp-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.4rem;
}

.mp-hero__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.mp-hero__subtitle {
  font-size: 0.92rem;
  opacity: 0.9;
  margin: 0;
}

.mp-body {
  max-width: 40rem;
  margin: -2rem auto 0;
  padding: 0 1rem 3rem;
  position: relative;
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 1rem;
}

/* A single menu still renders as a "grid" of one — keep it comfortably narrow instead of
   stretching one card edge-to-edge on wide screens. */
.mp-grid:has(> :only-child) {
  grid-template-columns: minmax(0, 20rem);
  justify-content: center;
}

.mp-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-foreground);
  text-align: start;
  min-height: 44px;
  opacity: 0;
  animation: mp-card-in 380ms ease forwards;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.mp-grid .mp-card:nth-child(1) { animation-delay: 20ms; }
.mp-grid .mp-card:nth-child(2) { animation-delay: 70ms; }
.mp-grid .mp-card:nth-child(3) { animation-delay: 120ms; }
.mp-grid .mp-card:nth-child(n+4) { animation-delay: 160ms; }

@keyframes mp-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .mp-card {
    opacity: 1;
    animation: none;
  }
}

.mp-card:hover,
.mp-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.mp-card__logo-ring {
  flex: 0 0 auto;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 55%, white));
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-card__logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  padding: 0.2rem;
  background-color: var(--color-surface);
  border: 2px solid var(--color-surface);
}

.mp-card__logo-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--color-surface);
  border: 2px solid var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}
.mp-card__logo-fallback svg {
  width: 1.4rem;
  height: 1.4rem;
}

.mp-card__body {
  min-width: 0;
  flex: 1 1 auto;
}

.mp-card__name {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  overflow-wrap: anywhere;
}

.mp-card__desc {
  font-size: 0.82rem;
  color: var(--color-muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mp-card__arrow {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--color-muted);
}

.mp-empty {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--color-muted);
}

.mp-empty__icon-wrap {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background-color: var(--primary-color-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-empty svg {
  width: 2rem;
  height: 2rem;
  color: var(--primary-color);
}

.mp-empty p {
  margin: 0;
  font-size: 0.95rem;
}

@media (min-width: 640px) {
  .mp-hero {
    padding: 2.5rem 1rem 4rem;
  }

  .mp-hero__logo {
    width: 5.5rem;
    height: 5.5rem;
  }

  .mp-hero__name {
    font-size: 1.8rem;
  }
}
