/* ==========================================================================
   Mausam Mobile Device Shell & Simdel-Style Bottom Navigation Dock
   ========================================================================== */

/* Device Shell Container */
.phone-device-wrapper {
  position: relative;
  width: 412px;
  height: 864px;
  background: #1E293B;
  border-radius: 54px;
  padding: 12px;
  box-shadow: 
    0 30px 70px -15px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 0 2px rgba(255, 255, 255, 0.2),
    inset 0 0 0 4px #0F172A;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

/* Fullscreen Mode Override */
.phone-device-wrapper.fullscreen-mode,
.phone-device-wrapper.fullscreen-view {
  width: 100%;
  max-width: 580px;
  height: 94vh;
  border-radius: 36px;
  box-shadow: var(--shadow-card-hover);
}

/* Phone Screen Display (Inside Bezel) */
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.05);
}

/* Realistic Status Bar */
.phone-status-bar {
  height: 48px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  z-index: 40;
  background: transparent;
  flex-shrink: 0;
}

.status-time {
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}

/* Dynamic Island */
.dynamic-island {
  width: 110px;
  height: 28px;
  background: #0F172A;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.dynamic-island:hover {
  width: 160px;
}

.island-camera {
  width: 10px;
  height: 10px;
  background: #1E293B;
  border-radius: 50%;
  border: 1.5px solid #334155;
}

.island-sensor {
  width: 7px;
  height: 7px;
  background: #0284C7;
  border-radius: 50%;
  box-shadow: 0 0 6px #0EA5E9;
  animation: pulseSensor 2.5s infinite;
}

@keyframes pulseSensor {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

.status-indicators {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-main);
}

.battery-pill {
  width: 22px;
  height: 11px;
  border: 1.5px solid var(--text-main);
  border-radius: 3.5px;
  padding: 1px;
  position: relative;
  display: flex;
  align-items: center;
}
.battery-pill::after {
  content: '';
  position: absolute;
  right: -3px;
  width: 2px;
  height: 4px;
  background: var(--text-main);
  border-radius: 0 1px 1px 0;
}
.battery-level {
  width: 80%;
  height: 100%;
  background: var(--text-main);
  border-radius: 1.5px;
}

/* App Viewport Scroll Container */
.phone-viewport-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 16px 95px 16px; /* Bottom padding for Simdel floating dock */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Custom Sleek Scrollbar */
.phone-viewport-scroll::-webkit-scrollbar {
  width: 4px;
}
.phone-viewport-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

/* App Screens Switcher */
.app-screen-view {
  display: none;
  animation: fadeInScreen 0.25s ease-out;
}
.app-screen-view.active {
  display: block;
}

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

/* Top App Branding Bar inside Phone */
.app-internal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-top: 4px;
}

.app-identity-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-imd-tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.moes-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  background: #E2E8F0;
  color: #334155;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.header-action-btn:hover {
  background: var(--bg-surface-elevated);
  transform: scale(1.05);
}

/* Horizontal Persona Switcher Track */
.persona-switcher-wrapper {
  margin-bottom: 16px;
  margin-left: -16px;
  margin-right: -16px;
  padding: 2px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.persona-switcher-wrapper::-webkit-scrollbar {
  display: none;
}

.persona-switcher-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
}

.persona-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.persona-tab-btn .tab-icon {
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}

.persona-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
  transform: translateY(-1px);
}

.persona-tab-btn.active {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.persona-tab-btn.active .tab-icon {
  transform: scale(1.1);
  color: #38BDF8;
}

/* ==========================================================================
   SIMDEL MOBILE BOTTOM NAVIGATION DOCK
   ========================================================================== */
.simdel-dock-container {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 360px;
  height: 64px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-dock), 0 0 0 1px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  z-index: 45;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 60px;
  height: 48px;
  border-radius: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.dock-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.dock-label {
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dock-item:hover {
  color: var(--text-main);
}

.dock-item:active {
  transform: scale(0.92);
}

.dock-item.active {
  color: var(--brand-blue);
}

.dock-item.active .dock-icon-box {
  transform: translateY(-2px);
  color: var(--brand-blue);
}

.dock-item.active .dock-label {
  font-weight: 700;
  color: var(--brand-blue);
}

/* Active Floating Pill Indicator */
.dock-item.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  background: var(--brand-blue);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--brand-sky);
}

/* Notification Badge on Dock */
.dock-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  width: 7px;
  height: 7px;
  background: var(--brand-rose);
  border-radius: 50%;
  box-shadow: 0 0 5px var(--brand-rose);
}

/* ==========================================================================
   NATIVE MOBILE VIEW (PHONE DISPLAY)
   Removes the mockup bezel, frame border, simulated status bar, and dynamic island
   on actual mobile phone displays and emulators, while preserving the frame on desktop.
   ========================================================================== */
@media screen and (max-width: 900px), screen and (max-device-width: 900px), screen and (hover: none) and (pointer: coarse) {
  html, body {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--bg-primary) !important;
    background-color: var(--bg-primary) !important;
  }

  .desktop-stage-layout {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    background: var(--bg-primary) !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  .phone-device-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--bg-primary) !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    inset: auto !important;
    overflow: hidden !important;
  }

  .phone-screen {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: var(--bg-primary) !important;
    overflow: hidden !important;
  }

  /* Completely hide simulated phone frame status bar and notch on real mobile devices */
  .phone-status-bar,
  .dynamic-island,
  .island-camera,
  .island-sensor,
  .status-indicators,
  .battery-pill {
    display: none !important;
  }

  /* Adapt onboarding flow to fill entire screen edge-to-edge */
  .onboarding-overlay {
    inset: 0 !important;
  }

  /* Native scroll viewport with notch safe-area support */
  .phone-viewport-scroll {
    padding-top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    padding-left: calc(16px + env(safe-area-inset-left, 0px)) !important;
    padding-right: calc(16px + env(safe-area-inset-right, 0px)) !important;
    height: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Native bottom floating dock ergonomics */
  .simdel-dock-container {
    position: fixed !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: calc(100% - 24px) !important;
    max-width: 440px !important;
    z-index: 55 !important;
  }
}


