/* ============================================
   DEMO PORTAL — orderhere.ai
   Premium dark SaaS demo experience
   ============================================ */

/* --- Dynamic brand colors (set by JS) --- */
:root {
  --demo-color: #FF6B35;
  --demo-text-color: #ffffff;
  --demo-color-10: rgba(255, 107, 53, 0.10);
  --demo-color-15: rgba(255, 107, 53, 0.15);
  --demo-color-25: rgba(255, 107, 53, 0.25);
  --demo-color-40: rgba(255, 107, 53, 0.40);
  --bg-primary: #09090f;
  --bg-elevated: #0f0f18;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.10);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.40);
  --text-muted: rgba(255, 255, 255, 0.25);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ============================================
   LOGIN SCREEN
   ============================================ */

.portal-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  background: var(--bg-primary);
}

.login-ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 40%, rgba(255, 107, 53, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 30% 60%, rgba(100, 100, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 440px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
  color: var(--text-tertiary);
}

.login-logo span {
  font-style: italic;
  color: #FF6B35;
}

.login-card h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.login-form {
  margin-bottom: 2rem;
}

.login-input-group {
  display: flex;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-medium);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.login-input-group:focus-within {
  border-color: rgba(255, 107, 53, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.08);
}

.login-input-group input {
  flex: 1;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  outline: none;
}

.login-input-group input::placeholder {
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.login-input-group button {
  padding: 1rem 1.75rem;
  background: #FF6B35;
  border: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
  position: relative;
}

.login-input-group button:hover {
  background: #e55a2b;
}

.login-input-group button:active {
  transform: scale(0.98);
}

.login-input-group button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-error {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #ff6b6b;
  min-height: 1.2rem;
}

.login-contact {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.login-contact a {
  color: #FF6B35;
  text-decoration: none;
}

.login-contact a:hover {
  text-decoration: underline;
}

/* ============================================
   DEMO HEADER
   ============================================ */

.demo-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 9, 15, 0.85);
}

.demo-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.demo-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.demo-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: contain;
  display: none;
}

.demo-logo-img.visible {
  display: block;
}

.demo-restaurant-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.demo-tagline {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: block;
  margin-top: 0.1rem;
}

.demo-powered-by {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.demo-powered-by strong {
  color: var(--text-tertiary);
}

/* ============================================
   HERO SECTION
   ============================================ */

.demo-hero {
  position: relative;
  padding: 5rem 2rem 4rem;
  text-align: center;
  overflow: hidden;
}

.demo-hero-glow {
  display: none;
}

@keyframes heroGlowIn {
  to { opacity: 1; }
}

.demo-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.demo-hero-badge {
  display: inline-block;
  padding: 0.4rem 1.25rem;
  background: var(--demo-color-10);
  border: 1px solid var(--demo-color-25);
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--demo-color);
  margin-bottom: 1.75rem;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeSlideUp 0.6s ease-out 0.2s forwards;
}

.demo-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(16px);
  animation: fadeSlideUp 0.7s ease-out 0.35s forwards;
}

.demo-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeSlideUp 0.6s ease-out 0.5s forwards;
}

.demo-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  background: var(--demo-color);
  color: var(--demo-text-color);
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 24px var(--demo-color-25);
  opacity: 0;
  transform: translateY(12px);
  animation: fadeSlideUp 0.6s ease-out 0.65s forwards;
}

.demo-hero-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px var(--demo-color-40);
}

.demo-hero-cta:active {
  transform: translateY(0) scale(0.98);
}

.cta-mic-icon {
  flex-shrink: 0;
}

@keyframes fadeSlideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SECTIONS
   ============================================ */

.demo-section {
  padding: 0 2rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 0;
  border-top: 1px solid var(--border-subtle);
}

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
}

.section-header {
  margin-bottom: 2rem;
}

.section-sublabel {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  margin-top: 0.5rem;
}

/* ============================================
   PERSONAL WELCOME MESSAGE
   ============================================ */

.demo-welcome-message {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeSlideUp 0.7s ease-out 0.8s forwards;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}

.demo-welcome-message.hidden {
  display: none;
}

.demo-welcome-message .welcome-greeting {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.demo-welcome-message .welcome-body {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 1rem;
}

.demo-welcome-message .welcome-signature {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-tertiary);
  margin-top: 1.5rem;
  line-height: 1.7;
}

/* ============================================
   SAMPLE PROMPTS
   ============================================ */

.demo-prompts-section .section-inner {
  border-top: none;
  padding-top: 0;
  padding-bottom: 2rem;
}

.prompt-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.prompt-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.prompt-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--demo-color);
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.3s;
}

.prompt-pill:hover {
  border-color: var(--demo-color-40);
  background: var(--demo-color-10);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.prompt-pill:hover::before {
  opacity: 1;
}

.prompt-pill:active {
  transform: translateY(0) scale(0.98);
}

/* Staggered entrance */
.prompt-pill {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeSlideUp 0.4s ease-out forwards;
}
.prompt-pill:nth-child(1) { animation-delay: 0.7s; }
.prompt-pill:nth-child(2) { animation-delay: 0.85s; }
.prompt-pill:nth-child(3) { animation-delay: 1.0s; }
.prompt-pill:nth-child(4) { animation-delay: 1.15s; }

/* ============================================
   MENU
   ============================================ */

/* Menu notes (sandwich includes, wrap option, etc.) */
.menu-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.menu-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.menu-note-icon {
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* Category accordion */
.menu-category {
  margin-bottom: 0.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.menu-category:hover {
  border-color: var(--border-medium);
}

.menu-category.open {
  border-color: var(--demo-color-25);
  box-shadow: 0 0 0 1px var(--demo-color-10);
}

.menu-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.menu-category-header:hover {
  background: rgba(255, 255, 255, 0.02);
}

.menu-category-header h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.category-icon {
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
}

.category-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.toggle-icon {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  display: inline-flex;
}

.menu-category.open .toggle-icon {
  transform: rotate(180deg);
}

.menu-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.menu-category.open .menu-items {
  max-height: 2000px;
}

.menu-items-inner {
  padding: 0 1.25rem 1rem;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item-name {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.menu-item-desc {
  font-size: 0.73rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.15rem;
  line-height: 1.4;
}

.menu-item-price {
  font-size: 0.88rem;
  color: var(--demo-color);
  font-weight: 600;
  white-space: nowrap;
  margin-left: 1.5rem;
  font-variant-numeric: tabular-nums;
}

/* Staggered entrance for categories */
.menu-category {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeSlideUp 0.4s ease-out forwards;
}
.menu-category:nth-child(1) { animation-delay: 0.8s; }
.menu-category:nth-child(2) { animation-delay: 0.9s; }
.menu-category:nth-child(3) { animation-delay: 1.0s; }
.menu-category:nth-child(4) { animation-delay: 1.1s; }
.menu-category:nth-child(5) { animation-delay: 1.2s; }
.menu-category:nth-child(6) { animation-delay: 1.3s; }
.menu-category:nth-child(7) { animation-delay: 1.4s; }
.menu-category:nth-child(8) { animation-delay: 1.5s; }

/* ============================================
   LOCATIONS
   ============================================ */

.demo-locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.location-item {
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 0.65rem;
  transition: border-color 0.2s;
}

.location-item:hover {
  border-color: var(--border-medium);
}

.location-item:last-child {
  margin-bottom: 0;
}

.location-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.location-detail {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.location-phone {
  color: var(--demo-color);
  text-decoration: none;
  font-weight: 500;
}

.location-phone:hover {
  text-decoration: underline;
}

/* Google Map */
.locations-map {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.locations-map:empty {
  display: none;
}

/* ============================================
   FLOATING VOICE CTA
   ============================================ */

.floating-voice-cta {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.75rem;
  background: var(--demo-color);
  color: var(--demo-text-color);
  border: none;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  z-index: 90;
  box-shadow:
    0 4px 20px var(--demo-color-25),
    0 0 60px var(--demo-color-10);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  animation: floatingCtaIn 0.6s ease-out 1.5s forwards;
}

.floating-voice-cta:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow:
    0 8px 32px var(--demo-color-40),
    0 0 80px var(--demo-color-15);
}

.floating-voice-cta:active {
  transform: translateX(-50%) scale(0.97);
}

.floating-voice-cta::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 100px;
  background: var(--demo-color);
  opacity: 0;
  z-index: -1;
  animation: ctaPulse 3s ease-in-out 2s infinite;
}

@keyframes floatingCtaIn {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes ctaPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(1.08); }
}

.floating-mic-icon {
  flex-shrink: 0;
}

/* Hide floating CTA when voice widget panel is open (class added by JS) */
.floating-voice-cta.widget-active {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.portal-login {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.portal-login.fade-out {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.portal-demo {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.portal-demo.visible {
  opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  .demo-hero {
    padding: 3.5rem 1.5rem 3rem;
  }

  .demo-hero-title {
    font-size: 2.2rem;
  }

  .demo-locations-grid {
    grid-template-columns: 1fr;
  }

  .locations-map {
    min-height: 250px;
  }

  .section-inner {
    padding: 2rem 0;
  }
}

/* ============================================
   LIGHT THEME (e.g. CostPlus pharmacy)
   ============================================ */

.theme-light {
  --bg-primary: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.025);
  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-medium: rgba(0, 0, 0, 0.12);
  --text-primary: #0f172a;
  --text-secondary: rgba(15, 23, 42, 0.75);
  --text-tertiary: rgba(15, 23, 42, 0.50);
  --text-muted: rgba(15, 23, 42, 0.30);
}

.theme-light .demo-header {
  background: rgba(255, 255, 255, 0.85);
}

.theme-light .menu-category-header:hover {
  background: rgba(0, 0, 0, 0.03);
}

.theme-light .login-input-group input {
  background: rgba(0, 0, 0, 0.03);
}

.theme-light .login-logo {
  color: #0f172a;
}

.theme-light .login-logo span {
  color: var(--demo-color);
}

.theme-light .login-input-group:focus-within {
  border-color: var(--demo-color-40);
  box-shadow: 0 0 0 3px var(--demo-color-10);
}

.theme-light .login-input-group button {
  background: var(--demo-color);
}

.theme-light .login-input-group button:hover {
  filter: brightness(1.1);
}

.theme-light .login-error {
  color: #dc2626;
}

.theme-light .login-contact a {
  color: var(--demo-color);
}

.theme-light .login-ambient {
  background:
    radial-gradient(ellipse 600px 400px at 50% 40%, var(--demo-color-10) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 30% 60%, rgba(100, 100, 255, 0.03) 0%, transparent 70%);
}

@media (max-width: 600px) {
  .login-card h1 {
    font-size: 1.5rem;
  }

  .login-input-group {
    flex-direction: column;
  }

  .login-input-group button {
    padding: 0.9rem;
  }

  .demo-header {
    padding: 0 1rem;
  }

  .demo-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .demo-restaurant-name {
    font-size: 1.15rem;
  }

  .demo-hero {
    padding: 2.5rem 1rem 2rem;
  }

  .demo-hero-title {
    font-size: 1.8rem;
  }

  .demo-hero-subtitle {
    font-size: 0.9rem;
  }

  .demo-section {
    padding: 0 1rem;
  }

  .demo-hero-cta {
    width: 100%;
    justify-content: center;
  }

  .prompt-pills {
    flex-direction: column;
  }

  .prompt-pill {
    justify-content: center;
  }

  .menu-category-header {
    padding: 0.85rem 1rem;
  }

  .menu-items-inner {
    padding: 0 1rem 0.85rem;
  }

  .floating-voice-cta {
    bottom: 1.25rem;
    font-size: 0.85rem;
    padding: 0.8rem 1.5rem;
  }
}
