/* Restaurant profile — onboarding kit */

:root {
  --rest-bg: #f3f4f6;
  --rest-ink: #0f172a;
  --rest-muted: #6b7280;
  --rest-primary: #22c55e;
  --rest-primary-dark: #16a34a;
  --rest-secondary: #f59e0b;
  --rest-soft: #e8f9ef;
  --rest-soft-deep: #d1f5de;
  --rest-line: #e5e7eb;
  --rest-card: #ffffff;
  --rest-font: "Roboto", system-ui, sans-serif;
}

body:has(.rest-page) {
  background: var(--rest-bg);
  font-family: var(--rest-font);
  color: var(--rest-ink);
}

.rest-page {
  padding: 28px 0 110px;
  font-family: var(--rest-font);
}

.rest-missing {
  max-width: 520px;
  padding: 60px 0;
}

.rest-missing h1 {
  color: var(--market-ink, #0f172a);
  margin-bottom: 10px;
}

.rest-missing p {
  color: #6b7280;
  margin-bottom: 20px;
}

.rest-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.7fr);
  gap: 24px;
  align-items: start;
}

.rest-hero,
.rest-card,
.rest-aside-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.rest-hero {
  overflow: hidden;
  margin-bottom: 18px;
}

.rest-hero-media {
  position: relative;
  min-height: 240px;
  background: #e8f9ef;
}

.rest-hero-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.rest-hero-fallback {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: #0f172a;
}

.rest-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  text-decoration: none;
}

.rest-back {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}

.rest-hero-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.rest-hero-body {
  padding: 18px 18px 20px;
}

.rest-identity {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.rest-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  border: 3px solid #fff;
  margin-top: -42px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
  background: #e8f9ef;
  flex-shrink: 0;
}

.rest-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
}

.rest-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 6px;
}

.rest-open,
.rest-closed,
.rest-verified {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rest-open {
  background: #e8f9ef;
  color: #22c55e;
}

.rest-closed {
  background: #fee2e2;
  color: #b91c1c;
}

.rest-verified {
  background: #e8f9ef;
  color: #16a34a;
}

.rest-identity h1 {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  color: #0f172a;
  line-height: 1.2;
}

.rest-meta-line,
.rest-status {
  margin: 0 0 4px;
  color: #6b7280;
  font-size: 0.92rem;
}

.rest-rating {
  color: #0f172a;
  font-weight: 600;
}

.rest-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.rest-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
}

.rest-action:hover {
  border-color: #22c55e;
  color: #16a34a;
  background: #e8f9ef;
}

.rest-card {
  padding: 18px 20px 20px;
  margin-bottom: 18px;
}

.rest-card h2,
.rest-aside-card h3 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.15rem;
}

.rest-about {
  margin: 0;
  color: #6b7280;
  line-height: 1.65;
}

.rest-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rest-detail-grid article {
  background: #f3f4f6;
  border-radius: 16px;
  padding: 14px;
}

.rest-detail-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 6px;
  font-weight: 600;
}

.rest-detail-grid strong {
  display: block;
  color: #0f172a;
  margin-bottom: 4px;
}

.rest-detail-grid p,
.rest-detail-grid a {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

.rest-detail-grid a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
}

.rest-hours-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.rest-hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 0.86rem;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
}

.rest-menu-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.rest-menu-head p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.rest-menu-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.rest-chip {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.rest-chip.is-active,
.rest-chip:hover {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.rest-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rest-meal-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.rest-meal-card.is-hidden,
.rest-menu-empty.is-hidden,
.rest-sticky.is-hidden {
  display: none !important;
}

.rest-meal-media {
  position: relative;
  display: block;
  background: #e8f9ef;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.rest-meal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rest-meal-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
}

.rest-meal-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #f59e0b;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.rest-meal-badge.is-soft {
  background: rgba(15, 23, 42, 0.9);
}

.rest-meal-body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.rest-meal-copy h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.3;
}

.rest-meal-copy h3 a {
  color: #0f172a;
  text-decoration: none;
}

.rest-meal-cat,
.rest-meal-desc {
  margin: 0;
  color: #6b7280;
  font-size: 0.84rem;
}

.rest-meal-desc {
  margin-top: 6px;
  line-height: 1.45;
}

.rest-meal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.rest-meal-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rest-meal-price strong {
  color: #0f172a;
  font-size: 1rem;
}

.rest-meal-price s {
  color: #9ca3af;
  font-size: 0.82rem;
}

.rest-add-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 0;
  background: #22c55e;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.rest-add-btn:hover {
  background: #16a34a;
}

.rest-menu-empty {
  padding: 24px 8px;
  color: #6b7280;
}

.rest-aside {
  position: sticky;
  top: 88px;
}

.rest-aside-card {
  padding: 18px;
  margin-bottom: 16px;
}

.rest-aside-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.rest-aside-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.92rem;
}

.rest-aside-list strong {
  color: #0f172a;
}

.rest-aside-rest {
  display: flex;
  gap: 12px;
  align-items: center;
}

.rest-aside-rest img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
}

.rest-aside-rest strong {
  display: block;
  color: #0f172a;
}

.rest-aside-rest p {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 0.86rem;
}

.btn-rest-primary,
.btn-rest-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.btn-rest-primary {
  background: #22c55e;
  color: #fff;
}

.btn-rest-primary:hover {
  background: #16a34a;
}

.btn-rest-secondary {
  background: #e8f9ef;
  color: #16a34a;
  border: 1px solid #d1f5de;
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

.rest-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(243, 244, 246, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e5e7eb;
}

.rest-sticky-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.rest-sticky strong {
  display: block;
  color: #0f172a;
}

.rest-sticky p {
  margin: 2px 0 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.rest-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(12px);
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.rest-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .rest-layout {
    grid-template-columns: 1fr;
  }

  .rest-aside {
    position: static;
  }

  .rest-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .rest-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .rest-page {
    padding-top: 18px;
  }

  .rest-menu-grid {
    grid-template-columns: 1fr;
  }

  .rest-identity {
    flex-direction: column;
  }

  .rest-avatar {
    margin-top: -36px;
  }

  .rest-hero-img,
  .rest-hero-fallback {
    height: 220px;
    min-height: 220px;
  }
}
