/* Upgrade modal + lock badges for Mr.Wang Chinese feature gating.
   Color tokens mirror the rest of the site (米色 + 墨绿主调). */

/* ── Lock badge on individual controls ───────────────────────── */
.mw-locked {
  position: relative;
  cursor: not-allowed !important;
}
.mw-locked .mw-lock-badge,
.mw-locked > .mw-lock-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  background: #fbfaf6;
  border: 1px solid rgba(118, 96, 70, 0.28);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 1;
  color: #ad7d37;
  pointer-events: none;
  box-shadow: 0 2px 4px rgba(72, 54, 31, 0.10);
  z-index: 5;
}

/* For inline pieces (segmented controls, swatches, tabs) the badge
   sits inside without breaking layout */
.mw-locked.mw-inline {
  opacity: 0.55;
  filter: grayscale(0.4);
}
.mw-locked.mw-inline .mw-lock-badge,
.mw-locked.mw-inline > .mw-lock-badge {
  position: static;
  margin-left: 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
  width: auto; height: auto;
}

/* ── Upgrade Modal ───────────────────────────────────────────── */
.mw-upgrade-backdrop {
  position: fixed; inset: 0;
  background: rgba(45, 40, 35, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.mw-upgrade-backdrop.open {
  display: flex;
  opacity: 1;
}

.mw-upgrade-card {
  width: 100%;
  max-width: 440px;
  background: #fffcf6;
  border: 1px solid rgba(118, 96, 70, 0.14);
  border-radius: 22px;
  box-shadow: 0 28px 60px -16px rgba(72, 54, 31, 0.28);
  padding: 34px 32px 28px;
  position: relative;
  text-align: center;
  transform: translateY(12px);
  transition: transform 0.22s ease;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #2d2823;
}
.mw-upgrade-backdrop.open .mw-upgrade-card {
  transform: translateY(0);
}

.mw-upgrade-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  color: #7b7167;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.mw-upgrade-close:hover {
  background: rgba(118, 96, 70, 0.08);
  color: #2d2823;
}

.mw-upgrade-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: #e8efe9;
  color: #143c2a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.mw-upgrade-title {
  font-family: ui-serif, Georgia, "Times New Roman", "Songti SC", "STSong", serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #2d2823;
  margin: 0 0 8px;
  line-height: 1.3;
}
.mw-upgrade-sub {
  font-size: 0.94rem;
  color: #7b7167;
  margin: 0 0 14px;
  line-height: 1.55;
}
.mw-upgrade-feature {
  display: inline-block;
  margin: 0 auto 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(173, 125, 55, 0.10);
  color: #ad7d37;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.mw-upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.mw-upgrade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 0;
}
.mw-upgrade-btn.primary {
  background: #143c2a;
  color: #fbfaf6;
  box-shadow: 0 6px 16px -4px rgba(20, 60, 42, 0.35);
}
.mw-upgrade-btn.primary:hover {
  background: #1d5238;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -4px rgba(20, 60, 42, 0.42);
}
.mw-upgrade-btn.ghost {
  background: transparent;
  color: #7b7167;
}
.mw-upgrade-btn.ghost:hover {
  background: rgba(118, 96, 70, 0.08);
  color: #2d2823;
}

/* ── Daily-quota chip (small toast variant for "X / 3 used today") ── */
.mw-quota-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(173, 125, 55, 0.10);
  color: #ad7d37;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.mw-quota-chip.exhausted {
  background: rgba(166, 70, 48, 0.10);
  color: #a64630;
}
