/* Mobile Bottom Navigation v2 — ported from MobileBottomNav.vue */

/* Hide on desktop */
@media (min-width: 1225px) {
  .mobile-bottom-nav {
    display: none !important;
  }
}

/* Kill any legacy inline mobile-nav blocks */
.mobile-nav,
.mobile-nav-toggle,
.mobile-nav-items,
.content-selection-container {
  display: none !important;
}

/* ========== DOCK ========== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.mobile-nav-dock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(82vw, 272px);
  height: 52px;
  background: var(--header-bg);
  border: 1px solid var(--accent-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.mobile-nav-dock .dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-bottom: 4px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, color 0.2s;
  position: relative;
  font-family: inherit;
  outline: none;
}

.mobile-nav-dock .dock-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

.mobile-nav-dock .dock-btn:active {
  transform: scale(0.96);
}

.mobile-nav-dock .dock-btn.active {
  color: var(--episode-container);
}

.mobile-nav-dock .dock-btn svg {
  width: 17px;
  height: 17px;
  opacity: 0.85;
}

.dock-btn-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b30;
  border: 1.5px solid var(--header-bg);
  box-shadow: 0 0 6px rgba(255, 59, 48, 0.6);
  display: none;
}

.mobile-nav-dock .dock-btn span {
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
}

.mobile-nav-dock .dock-btn .active-indicator {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--episode-container);
}

/* ========== COMPACT ========== */
.mobile-nav-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--accent-color);
  background: var(--header-bg);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, box-shadow 0.2s;
  font-family: inherit;
  outline: none;
}

.mobile-nav-compact:active {
  transform: scale(0.95);
}

.compact-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compact-icon-wrap svg {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

/* ========== NAV STYLE TOGGLE ========== */
.nav-style-toggle {
  padding: 0 14px 10px;
}

.nav-style-toggle .style-btn {
  width: 100%;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  outline: none;
}

.nav-style-toggle .style-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ========== BACKDROP ========== */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-out, visibility 0.2s;
}

.mobile-nav-backdrop.open {
  opacity: 1;
  visibility: visible;
}

/* ========== PANEL ========== */
.mobile-nav-panel {
  position: fixed;
  bottom: 8px;
  left: 5vw;
  right: 5vw;
  z-index: 1000;
  transform: translateY(calc(100% + 10px));
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.28s;
  pointer-events: none;
}

.mobile-nav-panel.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: all;
}

.mobile-nav-panel .panel-inner {
  background: var(--header-bg);
  border: 1px solid var(--accent-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
}

.panel-handle {
  display: flex;
  justify-content: center;
  padding-top: 10px;
  padding-bottom: 6px;
}

.panel-handle::after {
  content: '';
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent-color);
  opacity: 0.5;
}

/* ========== VIEWS ========== */
.panel-view {
  display: none;
}

.panel-view.active {
  display: block;
}

/* ========== MAIN GRID (4x2) ========== */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 6px 14px 14px;
}

.panel-grid .grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 2px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.1s, background 0.2s;
  text-decoration: none;
  font-family: inherit;
  outline: none;
}

.panel-grid .grid-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.panel-grid .grid-item:active {
  transform: scale(0.94);
}

.panel-grid .grid-item .icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
  position: relative;
}

.panel-grid .grid-item:hover .icon-wrap {
  background: rgba(255, 255, 255, 0.08);
}

.panel-grid .grid-item .icon-wrap svg {
  width: 18px;
  height: 18px;
}

.panel-grid .grid-item span {
  font-size: 10px;
  font-weight: 500;
}

/* ========== SUB-PANEL HEADER ========== */
.sub-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 6px;
}

.sub-panel-header h3 {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.sub-panel-header .back-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  outline: none;
  padding: 0;
}

.sub-panel-header .back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sub-panel-header .back-btn svg {
  width: 16px;
  height: 16px;
}

/* ========== THEME SUB-PANEL ========== */
.theme-sub-panel {
  padding: 0 14px 14px;
}

.theme-sub-panel .theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.theme-sub-panel .theme-btn {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--accent-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
  outline: none;
}

.theme-sub-panel .theme-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.theme-sub-panel .theme-btn:active {
  transform: scale(0.97);
}

.theme-sub-panel .theme-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ========== PANEL ACTIONS ========== */
.panel-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
}

.panel-actions .action-btn {
  flex: 1;
  padding: 9px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
  font-family: inherit;
  outline: none;
}

.panel-actions .action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.panel-actions .action-btn svg {
  width: 16px;
  height: 16px;
}

/* ========== AUTH COLORS ========== */
.grid-item.auth-login .icon-wrap {
  background: rgba(34, 197, 94, 0.15);
  border-radius: 10px;
}

.grid-item.auth-login span,
.grid-item.auth-login .icon-wrap svg {
  color: #22c55e;
}

.grid-item.auth-logout .icon-wrap {
  background: rgba(239, 68, 68, 0.15);
  border-radius: 10px;
}

.grid-item.auth-logout span,
.grid-item.auth-logout .icon-wrap svg {
  color: #ef4444;
}

/* ========== NOTIFICATIONS PANEL ========== */

.notif-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px 14px 8px;
}

.notif-tab {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(128, 128, 128, 0.25);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.notif-tab:hover {
  background: rgba(128, 128, 128, 0.12);
  color: var(--text-primary);
}

.notif-tab.active {
  background: rgba(128, 128, 128, 0.25);
  color: var(--text-primary);
}

.notif-tab .notif-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 6px var(--accent-color);
}

.notif-list {
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px 14px;
}

/* Notification Card */
.notif-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 8px;
  transition: background 0.2s, transform 0.1s, opacity 0.3s;
  cursor: pointer;
  border: 1px solid transparent;
}

.notif-card:active {
  transform: scale(0.98);
}

.notif-card.unread {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 59, 48, 0.25);
}

.notif-card.read {
  opacity: 0.75;
}

.notif-card-img {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.notif-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notif-card.read .notif-card-img img {
  filter: grayscale(0.72);
}

.notif-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.notif-card {
  position: relative;
}

.notif-card-body {
  display: flex;
  flex-direction: column;
  min-height: 64px;
}

.notif-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  margin-bottom: 2px;
}

.notif-card-time {
  font-size: 9px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin: 0;
}

.notif-card-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.notif-card-ep {
  font-size: 10px;
  font-weight: 500;
  color: var(--episode-container);
  line-height: 1.2;
}

.notif-card-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b30;
  box-shadow: 0 0 8px rgba(255, 59, 48, 0.7);
}

/* Empty/Loading states */
.notif-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
}

/* Notification actions */
.notif-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 14px 14px;
}

.notif-actions .action-btn {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
  outline: none;
}

.notif-actions .action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.notif-actions .action-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
