/* ==========================================================================
   KOÜS Mobile App — Uber Eats Customization Sheet & Bottom Modals
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 14, 0.66);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.bottom-sheet {
  width: 100%;
  max-width: var(--app-max-width);
  max-height: 92vh;
  background: var(--bg-surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
  animation: sheetSlideUp 0.22s ease-out;
}

@keyframes sheetSlideUp {
  from {
    transform: translateY(36px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 24px;
}

.sheet-hero-wrap {
  position: relative;
  height: 210px;
  background: var(--kous-charcoal);
}

.sheet-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet-close-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.sheet-item-header {
  padding: 16px;
  border-bottom: 6px solid var(--bg-app);
}

.sheet-item-title {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sheet-item-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.sheet-item-price {
  font-size: 1rem;
  font-weight: 800;
}

.sheet-item-kcal-live {
  background: var(--kous-obsidian);
  color: var(--gold-light);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
}

.sheet-item-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-top: 8px;
}

.sheet-rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  background: var(--bg-app);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
}

/* Option Groups */
.option-group {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.option-group.has-error {
  background: var(--status-danger-bg);
}

.option-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.option-group-title {
  font-size: 0.98rem;
  font-weight: 800;
}

.option-group-sub {
  font-size: 0.77rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.badge-required {
  background: var(--badge-required-bg);
  color: var(--badge-required-text);
  font-size: 0.71rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.badge-required.is-satisfied {
  background: var(--status-popular-bg);
  color: var(--status-popular);
}

.option-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(234, 231, 225, 0.55);
  text-align: left;
}

.option-row:first-of-type {
  border-top: none;
}

.option-row-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.option-row-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.option-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}

.option-price-delta {
  color: var(--text-secondary);
  font-weight: 600;
}

.option-popular-label {
  color: var(--status-popular);
  font-weight: 700;
}

.option-kcal-label {
  color: var(--text-muted);
}

.option-control {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.14s ease;
}

.option-control-radio {
  border-radius: var(--radius-pill);
}

.option-control-checkbox {
  border-radius: 6px;
}

.option-row.is-selected .option-control {
  border-color: var(--kous-obsidian);
  background: var(--kous-obsidian);
  color: var(--gold-light);
}

/* Sticky Sheet Footer */
.sheet-footer {
  padding: 12px 16px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-app);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 8px;
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-value {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
}

.sheet-add-cta {
  flex: 1;
}

/* Startup Client Email & Geolocation Onboarding Modal */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(8px);
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.onboarding-card {
  width: 100%;
  max-width: 396px;
  background: var(--bg-surface);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(197, 167, 89, 0.4);
  box-shadow: var(--shadow-float);
  animation: sheetSlideUp 0.22s ease-out;
}

.onboarding-hero {
  position: relative;
  background: var(--kous-obsidian);
  background-image:
    linear-gradient(155deg, rgba(14, 14, 14, 0.92) 30%, rgba(36, 30, 18, 0.94) 100%),
    url('/assets/brand/zellige-pattern.png');
  background-size: auto, 180px;
  color: #FFFFFF;
  padding: 22px 20px 18px;
  text-align: center;
}

.onboarding-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  font-weight: 800;
}

.onboarding-emblem {
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  border-radius: var(--radius-pill);
  background: var(--kous-obsidian);
  border: 2px solid var(--gold-primary);
  padding: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-title {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--gold-light);
}

.onboarding-subtitle {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 290px;
  margin: 8px auto 0;
  line-height: 1.55;
}

.onboarding-form {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboarding-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.onboarding-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.onboarding-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-primary);
}

.locate-btn {
  background: var(--kous-obsidian);
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
}

.locate-btn:disabled {
  opacity: 0.6;
}

.onboarding-gps-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--status-popular);
}

.onboarding-error {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Native-Style Full-Screen Brand Splash Screen */
body.is-splash-active {
  overflow: hidden;
  height: 100dvh;
}

body.is-splash-active .device-stage {
  visibility: hidden;
  opacity: 0;
}

.device-stage {
  transition: opacity 0.35s ease;
}

.splash-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 9999;
  background: #0E0E0E;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.38s ease, visibility 0.38s ease;
  cursor: pointer;
}

.splash-frame {
  width: 100%;
  height: 100%;
  max-width: var(--app-max-width);
  overflow: hidden;
  background: #1B1210;
}

.splash-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.splash-screen.is-fading-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
