/* ============================================
   Bottom Navigation (Mobile)
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* Frosted glass effect (light theme by default) */
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.12);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  padding-bottom: calc(var(--spacing-sm) + env(safe-area-inset-bottom));
  z-index: 100;
  gap: var(--spacing-xs);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-lg);
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  min-width: 60px;
  flex: 1;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
  color: var(--color-primary);
}

.bottom-nav-label {
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
}

.bottom-nav-item:active .bottom-nav-icon,
.bottom-nav-item form button:active .bottom-nav-icon,
.bottom-nav-form button:active .bottom-nav-icon {
  transform: scale(0.9);
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--color-white);
  opacity: 0.8;
}

/* Floating New Drive button (mobile only) */
.fab-new-drive-form {
  position: fixed;
  right: var(--spacing-lg);
  bottom: calc(80px + env(safe-area-inset-bottom));
  z-index: 110;
  margin: 0;
}

.fab-new-drive-form .fab-new-drive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  border-radius: 9999px;
  border: none;
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.fab-new-drive-icon {
  width: 24px;
  height: 24px;
  color: var(--color-white) !important;
}

@media (min-width: 769px) {
  .fab-new-drive-form {
    display: none;
  }
}

/* Desktop: Hide bottom nav */
@media (min-width: 769px) {
  .bottom-nav {
    display: none;
  }
}

/* Dark mode bottom nav: keep frosted look but on a dark base */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bottom-nav,
  body:not([data-theme="light"]) .bottom-nav {
    background-color: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(15, 23, 42, 0.95);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.6);
  }
}

[data-theme="dark"] .bottom-nav,
body[data-theme="dark"] .bottom-nav {
  background-color: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.6);
}
