/* Site-wide membership tier (header chip, profile menu, chart Pro gates) */

.header-membership-chip {
  height: calc(28px * var(--ui-density));
  padding: 0 calc(10px * var(--ui-density));
  border-radius: calc(999px * var(--ui-density));
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.header-membership-chip:hover,
.header-membership-chip:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.header-membership-chip--pro {
  background: var(--theme-ach-premium-gradient);
  color: var(--theme-ach-premium-text);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.header-membership-chip--free {
  color: var(--theme-text-secondary);
  background: rgba(255, 255, 255, 0.06);
}

body.light-mode .header-membership-chip--free {
  background: rgba(15, 18, 32, 0.06);
  border-color: rgba(15, 18, 32, 0.12);
}

.dropdown-membership-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(10px * var(--ui-density));
  padding: calc(8px * var(--ui-density)) calc(12px * var(--ui-density));
  font-size: 0.82rem;
}

.dropdown-membership-label {
  font-weight: 700;
  color: var(--theme-text-primary);
}

.dropdown-membership-action {
  border: none;
  background: transparent;
  color: var(--theme-accent-primary);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: calc(2px * var(--ui-density)) 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropdown-membership-action:hover,
.dropdown-membership-action:focus-visible {
  filter: brightness(1.1);
  outline: none;
}

.time-range-selector button.hm-chart-range-btn--pro-gated {
  opacity: 0.38;
  color: var(--theme-text-muted, #8b95a8);
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

body.light-mode .time-range-selector button.hm-chart-range-btn--pro-gated {
  color: var(--theme-text-muted, #6b7280);
  border-color: rgba(15, 18, 32, 0.1);
  background: rgba(15, 18, 32, 0.04);
}

.time-range-selector button.hm-chart-range-btn--pro-gated:hover,
.time-range-selector button.hm-chart-range-btn--pro-gated:focus-visible {
  opacity: 0.48;
  filter: none;
  background: rgba(255, 255, 255, 0.05);
}

.time-range-selector button.hm-chart-range-btn--pro-gated.active {
  opacity: 0.38;
  color: var(--theme-text-muted, #8b95a8);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.hm-chart-range-hint {
  margin: calc(4px * var(--ui-density)) 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--theme-text-muted);
  max-width: 42rem;
}

.settings-plan-features {
  margin: calc(12px * var(--ui-density)) 0 0;
  padding-left: calc(18px * var(--ui-density));
  color: var(--theme-text-secondary);
  font-size: 0.86rem;
  line-height: 1.45;
}

.settings-plan-features li + li {
  margin-top: calc(4px * var(--ui-density));
}

.hm-upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px * var(--ui-density));
  background: rgba(0, 0, 0, 0.55);
}

.hm-upgrade-modal[hidden] {
  display: none !important;
}

.hm-upgrade-modal__card {
  width: min(100%, 420px);
  border-radius: calc(12px * var(--ui-density));
  background: var(--theme-bg-elevated, #1a1f2e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--theme-shadow-dropdown, 0 12px 40px rgba(0, 0, 0, 0.45));
  padding: calc(18px * var(--ui-density)) calc(20px * var(--ui-density));
}

.hm-upgrade-modal__title {
  margin: 0 0 calc(8px * var(--ui-density));
  font-size: 1.05rem;
}

.hm-upgrade-modal__body {
  margin: 0 0 calc(16px * var(--ui-density));
  color: var(--theme-text-secondary);
  font-size: 0.9rem;
  line-height: 1.45;
}

.hm-upgrade-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(8px * var(--ui-density));
  justify-content: flex-end;
}
