/* Apollo PWA BottomBarView — extracted from apollo-pwa-origin */

@font-face {
  font-family: 'Raleway Cyrillic';
  src: url('assets/fonts/Raleway-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

:root {
  --apollo-white: #ffffff;
  --apollo-nearly-dark-blue: #2633c5;
  --apollo-gradient-end: #6a88e5;
  --apollo-selected-icon: rgb(73, 9, 87); /* Color.fromRGBO(73, 9, 87, 1) */
  --apollo-deep-purple: #673ab7; /* Colors.deepPurple */
  --apollo-bar-height: 62px;
  --apollo-notch-radius: 38px;
  --apollo-center-gap: 64px;
  --apollo-fab-size: 76px; /* 38 * 2 */
  --apollo-fab-logo-size: 60px;
  --apollo-shadow: 0 8px 16px rgba(38, 51, 197, 0.4);
  --apollo-bar-elevation: 0 -4px 16px rgba(0, 0, 0, 0.12);
  --apollo-font: 'Raleway Cyrillic', 'Raleway', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--apollo-font);
  background: #f2f3f8;
}

.demo-content {
  padding: 24px;
  padding-bottom: 140px;
}

.demo-content h1 {
  font-size: 20px;
  font-weight: 600;
  color: #17262a;
}

/* ── Bottom bar shell ── */
.bottom-bar-wrapper {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  transform: translateY(-6px); /* matches Transform.translate(offset: Offset(0, -6)) */
}

.bottom-bar {
  position: relative;
  height: var(--apollo-bar-height);
  filter: drop-shadow(var(--apollo-bar-elevation));
}

/* SVG shape with center notch (TabClipper, radius=38) */
.bottom-bar-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--apollo-white);
}

.bottom-bar-inner {
  position: relative;
  height: var(--apollo-bar-height);
  padding: 4px 8px 0;
  display: flex;
  align-items: flex-start;
}

.bottom-bar-tabs {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.bottom-bar-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  min-width: 0;
  font-family: var(--apollo-font);
  -webkit-tap-highlight-color: transparent;
}

.bottom-bar-tab .tab-icon {
  font-size: 26px;
  line-height: 1;
  color: #000;
  transition: font-size 0.2s ease, color 0.2s ease;
}

.bottom-bar-tab.active .tab-icon {
  font-size: 36px;
  color: var(--apollo-selected-icon);
}

.bottom-bar-tab .tab-label {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 1.1;
  white-space: nowrap;
}

/* PNG icon variant (legacy assets from tabIcon_data.dart) */
.bottom-bar-tab .tab-icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  transition: width 0.2s ease, height 0.2s ease;
}

.bottom-bar-tab.active .tab-icon-img {
  width: 36px;
  height: 36px;
}

/* Center spacer + «начать чат» label */
.bottom-bar-center-spacer {
  width: var(--apollo-center-gap);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bottom-bar-center-spacer .chat-label {
  margin-top: 35px;
  font-size: 14px;
  font-weight: 600;
  color: #000;
  white-space: nowrap;
}

/* Selection sparkle dots (animated in Flutter) */
.tab-sparkles {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-sparkles .dot {
  position: absolute;
  border-radius: 50%;
  background: var(--apollo-deep-purple);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bottom-bar-tab.active .tab-sparkles .dot {
  opacity: 1;
  transform: scale(1);
}

.tab-sparkles .dot-1 { width: 8px; height: 8px; top: -4px; left: -6px; transition-delay: 0.05s; }
.tab-sparkles .dot-2 { width: 4px; height: 4px; top: -8px; left: -2px; transition-delay: 0.15s; }
.tab-sparkles .dot-3 { width: 6px; height: 6px; top: -6px; right: -8px; transition-delay: 0.2s; }

/* ── Floating Apollo FAB ── */
.apollo-fab {
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  transform: translateX(-50%);
  width: var(--apollo-fab-size);
  height: var(--apollo-fab-size);
  border-radius: 50%;
  border: none;
  padding: 8px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--apollo-nearly-dark-blue), var(--apollo-gradient-end));
  box-shadow: var(--apollo-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.apollo-fab img {
  width: var(--apollo-fab-logo-size);
  height: var(--apollo-fab-logo-size);
  object-fit: contain;
  border-radius: 50%;
}

.apollo-fab.premium-locked {
  filter: saturate(0);
}

/* Safe area padding at bottom */
.bottom-bar-safe-area {
  height: env(safe-area-inset-bottom, 0px);
  background: var(--apollo-white);
}

/* ── Embedded in Apollo phone mockup ── */
.apollo-bottom-bar-embed.bottom-bar-wrapper {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  flex-shrink: 0;
  z-index: 12;
  --apollo-center-gap: 72px;
}

.apollo-bottom-bar-embed .apollo-fab {
  bottom: 56px;
}

.apollo-bottom-bar-embed .bottom-bar-center-spacer .chat-label {
  margin-top: 18px;
  font-size: 12px;
}

.apollo-bottom-bar-embed .bottom-bar-safe-area {
  height: 10px;
}
