/* ─── CF Network App Shell (layout.html.erb) ─────────────────── */
/* These classes are used by the actual Rails layout — not the demo phone wrapper */

.app-root {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #050507;
}

.app-status-bar {
  flex-shrink: 0;
  height: env(safe-area-inset-top, 0px);
  background: #050507;
}

.app-content {
  flex: 1;
  height: 0; /* makes flex-child height calculable so min-height: 100% works in children */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.app-content::-webkit-scrollbar { display: none; }

.app-tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(5,5,7,0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
  min-height: 60px;
}

/* ─── CF Network Phone Shell ─────────────────────────────────── */

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

body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 20%, #1a0533 0%, #050507 55%);
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  color: #ffffff;
}

.phone-shell-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px 20px 30px;
  gap: 14px;
}

.phone-shell-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2d2d35;
}

.phone-shell {
  position: relative;
  width: 390px;
  height: 844px;
  background: #0a0a0b;
  border-radius: 54px;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 40px 100px rgba(0,0,0,0.85),
    inset 0 1px 0 rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #0a0a0b;
  border-radius: 20px;
  z-index: 200;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #050507;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Status bar */
.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 4px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
  z-index: 99;
  height: 48px;
}

.phone-time { letter-spacing: -0.02em; }

.phone-indicators {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* Main scrollable content */
.screen-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #050507;
}
.screen-content::-webkit-scrollbar { display: none; }

/* Bottom home indicator */
.phone-home-indicator {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050507;
  flex-shrink: 0;
}
.phone-home-indicator::after {
  content: '';
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

/* Tab bar */
.tab-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(5,5,7,0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 6px 4px 0;
  flex-shrink: 0;
  height: 60px;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 10px;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  color: #4b5563;
  transition: color 0.15s;
  flex: 1;
}

.tab-item.active { color: #FF6B35; }
.tab-item.store-active { color: #a78bfa; }

.tab-icon { line-height: 0; }
.tab-icon svg { width: 22px; height: 22px; }

.tab-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ─── Demo laptop: scaled for smaller screens ─────────────────── */
@media (min-width: 1200px) and (max-width: 1400px) and (min-height: 750px) {
  .phone-shell {
    width: 488px;
    height: 750px;
    border-radius: 52px;
  }

  .phone-status-bar {
    font-size: 18px;
  }

  .tab-icon svg {
    transform: scale(1.3);
  }
}

/* ─── Mobile: full screen ─────────────────────────────────────── */
@media (max-width: 768px) {
  body { background: #050507; }
  .phone-shell-container { padding: 0; justify-content: flex-start; gap: 0; }
  .phone-shell-label { display: none; }
  .phone-shell {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }
  .phone-screen { border-radius: 0; }
  .phone-notch { display: none; }
}
