/* frontend/CSS/bottom-nav.css */
/* Standardized bottom navigation styles */

/* Bottom Nav (Quick Actions) */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0));
  background: rgba(18, 18, 18, 0.92);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  z-index: 9999;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform .22s ease;
}

.bottom-nav.hidden {
  transform: translateY(110%);
}

.bottom-nav .nav-item {
  flex: 1 1 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: var(--muted, #aaa);
  text-decoration: none;
  padding: 8px 2px;
  border-radius: 12px;
  transition: color .15s ease, background .2s ease, transform .15s ease;
  white-space: nowrap;
  user-select: none;
  position: relative;
  background: transparent;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.bottom-nav .nav-item i {
  font-size: 1rem;
}

.bottom-nav .nav-item .label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2px;
}

.bottom-nav .nav-item .icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-light, #fff);
  transition: color .2s ease, transform .15s ease;
  padding: 0;
}

.bottom-nav .nav-item:hover {
  color: var(--text-light, #fff);
}

.bottom-nav .nav-item.active {
  color: var(--primary, #00cc99);
}

.bottom-nav .nav-item.active .icon-pill {
  background: transparent;
  color: var(--primary, #00cc99);
  box-shadow: none;
}

/* Ensure page content isn't hidden behind the bottom nav */
.bottom-nav-spacer {
  height: calc(92px + env(safe-area-inset-bottom, 0px));
  width: 100%;
}

/* Nav badge for notifications */
.nav-badge {
  position: absolute;
  top: 6px;
  right: 20%;
  transform: translateX(50%);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ff4d4f;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* Sell Button Loading Overlay */
.sell-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-in-out;
}

.sell-loading-overlay.show {
  display: flex !important;
}

.sell-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-card, #1e1e1e);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 280px;
  text-align: center;
}

.sell-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(0, 204, 153, 0.2);
  border-top: 4px solid var(--primary, #00cc99);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.sell-loading-text {
  color: var(--text-light, #fff);
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.3px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .sell-loading-content {
    padding: 1.5rem;
    max-width: 240px;
  }

  .sell-loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
  }

  .sell-loading-text {
    font-size: 0.9rem;
  }
}

/* Orders action sheet */
.action-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 10000;
  display: none;
}

.action-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(100%);
  transition: transform .25s ease;
  background: var(--bg-card, #1e1e1e);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 16px;
  z-index: 10001;
  box-shadow: 0 -10px 30px rgba(0,0,0,.35);
}

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

.sheet-handle {
  width: 42px;
  height: 5px;
  background: rgba(255,255,255,.2);
  border-radius: 99px;
  margin: 6px auto 14px;
}

.sheet-title {
  text-align: center;
  color: var(--text-light, #fff);
  font-weight: 700;
  margin-bottom: 10px;
}

.sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.sheet-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-secondary, #2c2c2c);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}

.sheet-option:hover {
  transform: translateY(-2px);
  background: rgba(0, 204, 153, 0.12);
}

.sheet-option i {
  font-size: 1.2rem;
  color: var(--primary, #00cc99);
}

.sheet-option .text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sheet-option .text .title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text-light, #fff);
}

.sheet-option .text .desc {
  font-size: .78rem;
  color: var(--muted, #aaa);
}

