/* AuraDine - Core Luxury Application Styling */

/* View Visibility Switching */
.app-view {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.app-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Luxury Header */
.luxury-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 13, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gold-border);
  padding: 0.9rem 2rem;
}

.brand-badge {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border: 1px solid var(--gold-border);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
}

/* Persona Cards */
.persona-card {
  background: var(--bg-glass-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.persona-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-border-bright);
  background: rgba(28, 36, 50, 0.85);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.15);
}

.persona-card.selected {
  border-color: var(--gold-primary);
  background: linear-gradient(180deg, rgba(35, 45, 65, 0.9) 0%, rgba(20, 26, 38, 0.95) 100%);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.25);
}

.persona-card.selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

/* Stepper Bar */
.stepper-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  margin-bottom: 2.5rem;
}

.stepper-progress-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%);
  z-index: 1;
}

.stepper-progress-active {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: var(--gold-gradient);
  transform: translateY(-50%);
  z-index: 2;
  transition: width 0.4s ease;
}

.step-node {
  position: relative;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-charcoal);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.step-node.active {
  background: #0A0D12;
  border-color: var(--gold-light);
  color: var(--gold-light);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.step-node.completed {
  background: var(--gold-gradient);
  border-color: transparent;
  color: #0A0D12;
}

/* Service Mode Radio Cards */
.mode-card {
  background: rgba(18, 23, 33, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(24, 30, 42, 0.85);
}

.mode-card.selected {
  border-color: var(--gold-primary);
  background: rgba(30, 38, 54, 0.9);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

/* Concierge Butler Cards */
.butler-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.butler-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-border-bright);
  box-shadow: var(--shadow-luxury);
}

.butler-card.selected {
  border-color: var(--gold-primary);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

/* 4-Digit Handshake PIN Box */
.pin-display-box {
  background: linear-gradient(135deg, rgba(20, 26, 38, 0.9), rgba(10, 13, 18, 0.95));
  border: 2px dashed var(--gold-primary);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: inset 0 0 25px rgba(212, 175, 55, 0.1);
}

.pin-digit {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--gold-border);
  border-radius: 10px;
  width: 52px;
  height: 60px;
  line-height: 60px;
  margin: 0 4px;
  text-shadow: 0 0 12px rgba(243, 229, 171, 0.5);
}

/* 6-Stage Timeline */
.stage-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 2rem;
}

.stage-item::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 17px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.stage-item:last-child::before {
  display: none;
}

.stage-item.completed::before {
  background: var(--gold-gradient);
}

.stage-badge-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  background: var(--bg-charcoal);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  z-index: 2;
  transition: all 0.3s ease;
}

.stage-item.completed .stage-badge-circle {
  background: var(--gold-gradient);
  border-color: transparent;
  color: #0A0D12;
}

.stage-item.active .stage-badge-circle {
  background: #0A0D12;
  border-color: var(--emerald-trust);
  color: var(--emerald-trust);
  box-shadow: var(--emerald-glow);
  animation: pulseGreen 2s infinite;
}

/* Smartphone Shell (Server Partner View) */
.mobile-device-frame {
  max-width: 420px;
  margin: 0 auto;
  background: #090C10;
  border-radius: 46px;
  border: 10px solid #1E2530;
  box-shadow: 0 35px 80px -15px rgba(0, 0, 0, 0.9), 0 0 0 2px rgba(212, 175, 55, 0.25);
  overflow: hidden;
  position: relative;
}

.mobile-notch {
  width: 140px;
  height: 24px;
  background: #1E2530;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  margin: 0 auto;
  position: relative;
  z-index: 20;
}

.mobile-screen-content {
  min-height: 720px;
  max-height: 800px;
  overflow-y: auto;
  padding: 1.25rem;
  background: #0D1117;
}

/* Bill Escrow Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-charcoal);
  border: 1px solid var(--gold-border-bright);
  border-radius: 24px;
  box-shadow: var(--shadow-luxury);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  transform: scale(0.94);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.luxury-toast {
  background: rgba(18, 23, 33, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--gold-border-bright);
  box-shadow: var(--shadow-luxury);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  pointer-events: auto;
  animation: slideToast 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideToast {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Guided Auto-Demo Narrator Banner */
.auto-demo-banner {
  background: linear-gradient(135deg, rgba(30, 38, 54, 0.95), rgba(18, 23, 33, 0.98));
  border: 1px solid var(--gold-light);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  padding: 0.9rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Shimmer Effect */
.shimmer-badge {
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.1) 0%, rgba(243, 229, 171, 0.4) 50%, rgba(212, 175, 55, 0.1) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ========================================== */
/* MOBILE & IPHONE SAFARI RESPONSIVE STYLES  */
/* ========================================== */

@media (max-width: 768px) {
  /* Prevent horizontal overflow on mobile viewports */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
  }

  /* Luxury Navbar on Mobile */
  .luxury-navbar {
    padding: 0.55rem 0.75rem !important;
  }

  /* Demo Control Dock on Mobile */
  .demo-control-dock {
    bottom: max(10px, env(safe-area-inset-bottom, 10px)) !important;
    width: calc(100% - 16px) !important;
    max-width: 440px !important;
    padding: 4px 5px !important;
    gap: 3px !important;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(212, 175, 55, 0.35) !important;
  }

  .dock-tab {
    padding: 6px 6px !important;
    font-size: 0.72rem !important;
    gap: 3px !important;
    flex: 1 !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .dock-tab span:first-child {
    font-size: 0.88rem !important;
  }

  /* Main Container Padding */
  #mainContentContainer {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 5.5rem !important;
  }

  /* PIN Display on Mobile */
  .pin-display-box {
    padding: 0.8rem 0.5rem !important;
  }

  .pin-digit {
    width: 36px !important;
    height: 44px !important;
    line-height: 44px !important;
    font-size: 1.45rem !important;
    margin: 0 2px !important;
  }

  /* Mobile Device Frame in View 3 */
  .mobile-device-frame {
    max-width: 100% !important;
    border: 1px solid var(--gold-border) !important;
    border-radius: 20px !important;
    box-shadow: var(--shadow-luxury) !important;
  }

  .mobile-notch {
    display: none !important;
  }

  .mobile-screen-content {
    min-height: auto !important;
    max-height: none !important;
    padding: 0.85rem !important;
  }

  /* Stepper Progress on Mobile */
  .stepper-track {
    margin-bottom: 1.25rem !important;
  }

  .step-node {
    width: 30px !important;
    height: 30px !important;
    font-size: 0.75rem !important;
  }

  /* Stage Timeline on Mobile */
  .stage-item {
    gap: 0.75rem !important;
    padding-bottom: 1.25rem !important;
  }

  .stage-badge-circle {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.75rem !important;
  }

  .stage-item::before {
    left: 13px !important;
    top: 28px !important;
  }

  /* Modals on Mobile */
  .modal-overlay {
    padding: 0.75rem !important;
    align-items: flex-end !important;
  }

  .modal-card {
    max-width: 100% !important;
    max-height: 88vh !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Toast on Mobile */
  .toast-container {
    top: 65px !important;
    right: 12px !important;
    left: 12px !important;
  }

  .luxury-toast {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Radar Canvas on Mobile */
  #radarCanvas {
    width: 100% !important;
    height: auto !important;
    max-height: 320px !important;
  }

  /* Auto-Demo Banner on Mobile */
  .auto-demo-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0.8rem 1rem !important;
    gap: 0.75rem !important;
  }
}
