/*
 * Lavdin Mobile Account Panel Styles
 * ─────────────────────────────────────────────
 */

.mobile-account-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1045;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-account-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-account-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90dvh;
  background: var(--color-bg-body, #ffffff);
  z-index: 1050;
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

.mobile-account-panel.active {
  transform: translateY(0);
}

body.mobile-panel-open {
  overflow: hidden !important;
}

.mobile-panel-header {
  position: sticky;
  top: 0;
  background: var(--color-bg-body, #ffffff);
  z-index: 10;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
}

.mobile-panel-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text-main, #1e293b);
  text-decoration: none;
  border: none;
}

.mobile-panel-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-panel-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-muted, #94a3b8);
  margin-bottom: 12px;
  margin-top: 24px;
  padding-left: 4px;
}

.mobile-panel-section-title:first-child {
  margin-top: 8px;
}

.mobile-panel-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mobile-panel-card {
  background: var(--color-bg-subtle, #f8fafc);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  color: var(--color-text-main, #1e293b);
  transition: all 0.2s ease;
}

.mobile-panel-card i {
  font-size: 1.5rem;
  color: var(--color-primary, #3b82f6);
}

.mobile-panel-card span {
  font-size: 0.8rem;
  font-weight: 600;
}

.mobile-panel-nav-list {
  background: var(--color-bg-subtle, #f8fafc);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 16px;
  overflow: hidden;
}

.mobile-panel-nav-item {
  display: flex;
  align-items: center;
  padding: 16px;
  color: var(--color-text-main, #1e293b);
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.04));
}

.mobile-panel-nav-item:last-child {
  border-bottom: none;
}

.mobile-panel-nav-item i:first-child {
  width: 24px;
  font-size: 1.1rem;
  color: var(--color-primary, #3b82f6);
  opacity: 0.8;
  margin-right: 12px;
  text-align: center;
}

.mobile-panel-role-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--color-bg-subtle, #f8fafc);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  margin-bottom: 10px;
  color: var(--color-text-main, #1e293b);
  font-weight: 600;
  font-size: 0.9rem;
  width: 100%;
  text-align: left;
}

.mobile-panel-tier-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-panel-tier-btn {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--color-bg-subtle, #f8fafc);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.08));
  border-radius: 12px;
  color: var(--color-text-main, #1e293b);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none !important;
}

.mobile-panel-tier-btn.active {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--color-primary, #3b82f6);
}

/* ── Dark Theme Overrides ── */
[data-bs-theme="dark"] body .mobile-account-panel,
html[data-theme="dark"] .mobile-account-panel {
  background: var(--color-bg-body, #0f172a);
}

[data-bs-theme="dark"] body .mobile-panel-header,
html[data-theme="dark"] .mobile-panel-header {
  background: var(--color-bg-body, #0f172a);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] body .mobile-panel-close,
html[data-theme="dark"] .mobile-panel-close {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

[data-bs-theme="dark"] body .mobile-panel-card,
[data-bs-theme="dark"] body .mobile-panel-nav-list,
[data-bs-theme="dark"] body .mobile-panel-role-btn,
[data-bs-theme="dark"] body .mobile-panel-tier-btn,
html[data-theme="dark"] .mobile-panel-card,
html[data-theme="dark"] .mobile-panel-nav-list,
html[data-theme="dark"] .mobile-panel-role-btn,
html[data-theme="dark"] .mobile-panel-tier-btn {
  background: var(--color-bg-subtle, #1e293b);
  border-color: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

[data-bs-theme="dark"] body .mobile-panel-nav-item,
html[data-theme="dark"] .mobile-panel-nav-item {
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] body .mobile-panel-tier-btn.active,
html[data-theme="dark"] .mobile-panel-tier-btn.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}
