/* Mobile PWA Client Stylesheet */

body {
  background-color: #050508;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

/* Phone Mockup Wrap (When viewed on desktop browser) */
.mobile-container {
  width: 100%;
  max-width: 450px;
  min-height: 100vh;
  background-color: #07070a;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow-y: auto;
}

@media (min-width: 480px) {
  .mobile-container {
    min-height: 92vh;
    border-radius: 40px;
    margin: 4vh auto;
    border: 8px solid #1a1a24;
    height: 850px;
    max-height: 92vh;
  }
}

/* Header */
.pwa-header {
  padding: 24px 20px 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#pwa-logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.network-meta {
  display: flex;
  gap: 8px;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: monospace;
}

.meta-divider {
  color: rgba(255, 255, 255, 0.15);
}

/* Main Content */
.pwa-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
}

.pwa-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Audio Controller Card */
.player-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.stream-info .accent-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stream-info h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-top: 4px;
}

/* Audio pulse animation */
.audio-pulse-indicator {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.audio-pulse-indicator span {
  width: 3px;
  background: var(--accent-cyan);
  border-radius: 1px;
  animation: audio-bar-pulse 1.2s ease-in-out infinite;
  transform-origin: bottom;
}

.audio-pulse-indicator span:nth-child(1) { height: 15%; animation-delay: 0.1s; }
.audio-pulse-indicator span:nth-child(2) { height: 35%; animation-delay: 0.3s; }
.audio-pulse-indicator span:nth-child(3) { height: 15%; animation-delay: 0.5s; }
.audio-pulse-indicator span:nth-child(4) { height: 15%; animation-delay: 0.2s; }

.audio-pulse-indicator.playing span {
  animation-name: audio-bar-pulse-active;
}

@keyframes audio-bar-pulse-active {
  0% { transform: scaleY(1); }
  50% { transform: scaleY(4); }
  100% { transform: scaleY(1); }
}

/* Sync Gauge */
.sync-gauge-wrapper {
  margin: 16px auto;
  position: relative;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sync-gauge {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 5;
}

.gauge-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gauge-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 2px 0;
}

.gauge-unit {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(0, 230, 118, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid rgba(0, 230, 118, 0.15);
}

.gauge-svg-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

/* Waveform Canvas */
.waveform-container {
  height: 45px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

#waveform-canvas {
  width: 100%;
  height: 100%;
}

/* Playback controls */
.playback-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.btn-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.btn-play:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 229, 255, 0.45);
}

.btn-play:active {
  transform: scale(0.95);
}

.play-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #000;
  margin-left: 4px;
  transition: all 0.2s ease;
}

.play-icon.pause {
  width: 14px;
  height: 18px;
  border-style: double;
  border-width: 0px 0px 0px 14px;
  border-color: transparent transparent transparent #000;
  margin-left: 0;
}

.volume-slider-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 20px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.vol-icon {
  font-size: 0.9rem;
}

.volume-slider-wrapper input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  height: 4px;
  border-radius: 2px;
  outline: none;
}

.volume-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  transition: all 0.1s ease;
}

.volume-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: var(--accent-cyan);
}

/* Calibration section */
.calibration-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
}

.calibration-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cal-title-row {
  display: flex;
  flex-direction: column;
}

.cal-title-row span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.cal-title-row strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-text-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slider-limit {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-family: monospace;
}

.slider-container input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 3px;
  outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-helper {
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 8px;
}

/* Ad Card */
.ad-banner {
  border-color: var(--border-glow);
  position: relative;
  overflow: hidden;
}

.ad-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-cyan);
}

.ad-label {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.ad-body {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.ad-body img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-light);
}

.ad-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ad-details p {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-primary);
  font-weight: 500;
}

/* Tabs & B2B Dashboard Services */
.tabs-section {
  padding: 0;
  overflow: hidden;
}

.tab-headers {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.15);
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.01);
}

.tab-contents {
  padding: 16px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Menu Items List */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.menu-item-info h4 {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 600;
}

.menu-item-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.menu-item-action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.menu-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.btn-xs {
  font-size: 0.65rem;
  padding: 4px 10px;
  border-radius: 4px;
}

.menu-cart-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--gradient-primary);
  color: #000;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.2);
}

/* Departure List */
.departure-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ann-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ann-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ann-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ann-sub {
  font-size: 0.7rem;
  font-weight: 500;
}

.text-emerald {
  color: var(--accent-emerald);
}

.ann-time {
  font-size: 0.8rem;
  font-family: monospace;
  color: var(--text-secondary);
}

/* Calibration Overlay modal */
.cal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.cal-modal {
  width: 280px;
  padding: 30px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cal-circle-progress {
  position: relative;
  width: 100px;
  height: 100px;
}

.cal-circle-progress svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.cal-circle-anim {
  transition: stroke-dashoffset 0.1s linear;
}

.cal-step-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.cal-modal h4 {
  font-size: 1rem;
  color: var(--text-primary);
}

.cal-modal p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
