/* "My edits": nav entry and the list panel. Colours come from the site tokens. */

/* Nav button: sized like Sign In, placed just before Get KFT Pro. */
body > nav .kft-edits-nav {
  order: 3 !important;
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  height: 34px !important;
  min-height: 34px !important;
  margin: 0 0 0 14px !important;
  padding: 0 10px 0 12px !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-ink) !important;
  font: 700 12px/1 var(--kft-body, inherit) !important;
  white-space: nowrap !important;
  cursor: pointer;
}
body > nav .kft-edits-nav[hidden] { display: none !important; }
body > nav .kft-edits-nav:hover { border-color: var(--kft-accent, #E85A1A) !important; }
body > nav .kft-edits-nav span,
body > nav .kft-edits-menu-item span {
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--kft-accent, #E85A1A);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}
body > nav.kft-nav-compact .kft-edits-nav { margin-left: auto !important; }
body > nav.kft-nav-compact .kft-edits-nav:not([hidden]) ~ .kft-pro-cta { margin-left: 8px !important; }
html.kft-is-pro body > nav.kft-nav-compact:has(.kft-edits-nav:not([hidden])) .hamburger:not(#kft-nav-lock) { margin-left: 10px !important; }

/* In the phone menu only. */
body > nav .nav-links li.kft-edits-menu-item { display: none !important; }
body > nav .nav-links li.kft-edits-menu-item button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
@media (max-width: 560px) {
  body > nav .kft-edits-nav { display: none !important; }
  body > nav .nav-links li.kft-edits-menu-item:not([hidden]) { display: block !important; margin: 0 0 14px !important; border: 0 !important; }
}

/* Panel: a drawer from the right, a plain list inside. */
html.kft-edits-open { overflow: hidden; }
.kft-edits-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110000;
  background: rgba(0, 0, 0, .45);
}
.kft-edits-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 110001;
  display: flex;
  flex-direction: column;
  width: min(460px, 100vw);
  background: var(--bg-white);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 60px rgba(0, 0, 0, .35);
  color: var(--text-ink);
}
.kft-edits-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.kft-edits-panel h2 { margin: 0 0 6px; font-size: 20px; }
.kft-edits-panel header p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text-muted); }
.kft-edits-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-height: 34px !important;
  padding: 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--text-ink) !important;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.kft-edits-body { flex: 1 1 auto; overflow-y: auto; padding: 6px 20px 20px; }
.kft-edits-body h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.kft-edits-body h3 span { font-variant-numeric: tabular-nums; }
.kft-edits-list { list-style: none; margin: 0; padding: 0; }
.kft-edits-list > li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.kft-edits-item { min-width: 0; }
.kft-edits-title { font-size: 14px; font-weight: 700; }
.kft-edits-title strong { margin-right: 4px; }
.kft-edits-lines { margin: 4px 0 0; padding: 0; list-style: none; }
.kft-edits-lines li { font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.kft-edits-reset { flex: 0 0 auto; min-height: 32px; padding: 6px 12px; font-size: 12px; white-space: nowrap; }
.kft-edits-empty { margin: 24px 0; font-size: 14px; color: var(--text-muted); }
.kft-edits-panel footer { padding: 14px 20px 20px; border-top: 1px solid var(--border); }
.kft-edits-all { width: 100%; min-height: 40px; }
.kft-edits-all:disabled { opacity: .45; cursor: not-allowed; }
