/* ==========================================================================
   BitLa+ Mobile App Mirror Stylesheet
   Transforms the Web App into an App-like experience on Mobile devices
   ========================================================================== */

/* Mobile Bottom Navigation Dock (High-end Fintech App Bar matching Image 2) */
.mobile-nav-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: rgba(9, 11, 16, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
  z-index: 150;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
}

.mobile-dock-btn {
  background: transparent;
  border: none;
  color: #7E8B9B;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15px;
  cursor: pointer;
  flex: 1;
  height: 100%;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-dock-btn .dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-dock-btn .dock-svg {
  display: block;
  width: 22px;
  height: 22px;
}

.mobile-dock-btn:active .dock-icon {
  transform: scale(0.90);
}

.mobile-dock-btn.active {
  color: #FFFFFF;
  font-weight: 600;
}

.mobile-dock-btn.active .dock-icon {
  transform: scale(1.04);
}

[data-theme="white"] .mobile-nav-dock {
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="white"] .mobile-dock-btn {
  color: #64748B;
}

[data-theme="white"] .mobile-dock-btn.active {
  color: #0F172A;
}

/* Blue Theme adaptation (matches header color rgba(20, 27, 45, 0.88) & border #1E283D) */
[data-theme="blue"] .mobile-nav-dock {
  background: rgba(20, 27, 45, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #1E283D;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}

[data-theme="blue"] .mobile-dock-btn {
  color: #8493AC;
}

[data-theme="blue"] .mobile-dock-btn:hover,
[data-theme="blue"] .mobile-dock-btn.active {
  color: #FFFFFF;
}

/* Mobile Drawers / Bottom Sheets */
.mobile-sheet-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-sheet-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 80vh;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-sheet-overlay.active .mobile-sheet {
  transform: translateY(0);
}

.mobile-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin: 10px auto 4px;
}

.mobile-sheet-header {
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.mobile-sheet-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
}

.mobile-sheet-content {
  overflow-y: auto;
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(80vh - 60px);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1100px) {
  .main-container {
    grid-template-columns: 1fr 300px;
  }
  .signals-panel {
    display: none; /* Moved to drawer on tablet */
  }
}

@media (max-width: 768px) {
  .header {
    height: 56px;
    padding: 0 12px;
  }

  .logo-text {
    font-size: 17px;
  }

  .badge-tag {
    display: none;
  }

  .exchange-tabs {
    padding: 2px;
  }

  .exchange-tab-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .main-container {
    display: flex;
    flex-direction: column;
    padding: 6px;
    height: calc(100vh - 56px - 60px); /* Leave room for mobile dock */
    gap: 8px;
  }

  .movers-panel {
    display: none; /* Accessible via Mobile Dock "Top Movers" */
  }

  .signals-panel {
    display: none; /* Accessible via Mobile Dock "Señales" */
  }

  .chart-workspace {
    height: 100%;
    border-radius: 8px;
  }

  .chart-header {
    padding: 8px 12px;
  }

  .current-symbol {
    font-size: 15px;
  }

  .current-price {
    font-size: 15px;
  }

  .chart-legend {
    font-size: 11px;
    gap: 8px;
  }

  .mobile-nav-dock {
    display: flex;
  }

  .mobile-sheet-overlay {
    display: flex;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .mobile-sheet-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .agent-toast-container {
    top: 64px;
    bottom: auto;
    left: 12px;
    right: 12px;
    max-width: calc(100vw - 24px);
    gap: 6px;
  }

  .agent-toast {
    padding: 8px 12px;
  }

  .toast-title {
    font-size: 11px;
  }

  .toast-body {
    font-size: 10px;
    line-height: 1.3;
  }

  .settings-menu {
    right: -20px;
    min-width: 250px;
    max-width: calc(100vw - 24px);
  }
}

