/* ── Editors and readiness: loot pools, collect items, message defaults review, JTC editor, readiness ── */
/* ── Ladder action dropdown (custom select) sizing ── */
.ladder-action-slot { min-width: 130px; }
.ladder-action-slot .cs-wrapper { width: 100%; }
.ladder-step-field .ladder-action-slot { width: 140px; }

/* ── Loot pools advanced note ── */
.lp-advanced-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.6rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(250, 166, 26, 0.35);
  background: rgba(250, 166, 26, 0.08);
  border-radius: 8px;
  font-size: 0.76rem;
  color: var(--text-muted, #b5bac1);
  line-height: 1.4;
}
.lp-advanced-note svg { color: #faa61a; margin-top: 1px; }

/* ── Collect items editor ── */
.ci-grid { grid-template-columns: 1fr 110px; }
.ci-emoji-input { text-align: center; }
.ci-pools-wrap { margin-top: 0.75rem; border-top: 1px dashed var(--border); padding-top: 0.6rem; }
.ci-pools-label { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.ci-pools-hint { font-size: 0.72rem; color: var(--text-muted); }

/* ── Message Defaults review motivation ── */
#secMsgProgressBar.sec-progress-shine {
  background: linear-gradient(90deg, #57F287, #3BF7FF, #5865F2, #57F287);
  background-size: 200% 100%;
  animation: secProgressShine 2.4s linear infinite;
}
@keyframes secProgressShine { to { background-position: -200% 0; } }
.sec-mod-progress { display: inline-flex; align-items: center; gap: 0.45rem; margin-left: 0.5rem; }
.sec-mod-ring { position: relative; width: 22px; height: 22px; flex-shrink: 0; }
.sec-mod-ring svg { transform: rotate(-90deg); display: block; }
.sec-mod-ring .sec-ring-bg { fill: none; stroke: rgba(255,255,255,0.12); stroke-width: 3; }
.sec-mod-ring .sec-ring-fg { fill: none; stroke: #57F287; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 0.5s ease, stroke 0.3s ease; }
.sec-mod-ring.sec-ring-done .sec-ring-fg { stroke: #3BF7FF; }
.sec-mod-count { font-size: 0.72rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sec-confetti-piece {
  position: fixed;
  top: -12px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  z-index: 10040;
  pointer-events: none;
  animation: secConfettiFall linear forwards;
}
@keyframes secConfettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0.85; }
}
.sec-confetti-overlay { position: fixed; inset: 0; z-index: 10039; pointer-events: none; overflow: hidden; }
.resp-entry.sec-just-edited { animation: secEditedPulse 0.8s ease; }
@keyframes secEditedPulse {
  0% { box-shadow: 0 0 0 0 rgba(87, 242, 135, 0.45); }
  60% { box-shadow: 0 0 0 8px rgba(87, 242, 135, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(87, 242, 135, 0); }
}

/* ── JTC Channels Editor ── */

.jtc-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.jtc-editor-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.jtc-entry-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.jtc-entry-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.jtc-entry-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.jtc-entry-badge {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-dim);
}

.jtc-entry-name {
  flex: 1;
  min-width: 140px;
  max-width: 340px;
  font-weight: 600;
}

.jtc-entry-remove {
  flex-shrink: 0;
  color: var(--danger);
  font-weight: 700;
}

.jtc-collapse-btn {
  flex-shrink: 0;
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.jtc-collapse-btn:hover {
  color: var(--text);
  border-color: var(--primary);
}

.jtc-collapse-btn svg {
  transition: transform 0.15s ease;
}

.jtc-collapse-btn.expanded svg {
  transform: rotate(180deg);
}

.jtc-entry-card.collapsed {
  padding: 0.55rem 1rem;
  gap: 0;
}

.jtc-entry-card.collapsed > :not(.jtc-entry-head) {
  display: none;
}

.jtc-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem 1rem;
}

.jtc-field .form-label {
  margin-bottom: 0.35rem;
}

.jtc-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.jtc-limits-row input {
  max-width: 140px;
}

.jtc-gating-box {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.jtc-gating-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.jtc-gating-lock {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.jtc-gating-lock-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.jtc-gating-lock-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.jtc-gating-lock-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.jtc-entry-summary {
  font-size: 0.84rem;
  color: var(--text-muted);
  background: rgba(59, 247, 255, 0.04);
  border: 1px dashed rgba(59, 247, 255, 0.18);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

.jtc-summary-line b {
  color: var(--text);
  font-weight: 600;
}

.jtc-summary-warn {
  color: var(--warning);
  font-weight: 600;
}

.jtc-add-row {
  display: flex;
}

.jtc-editor-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.jtc-editor-empty-icon {
  font-size: 1.6rem;
}

.jtc-editor-empty-title {
  font-weight: 700;
  color: var(--text);
}

.jtc-editor-empty-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 520px;
}

/* ── Readiness badges, banners and required outlines ── */

.readiness-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.readiness-badge.readiness-error {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.45);
}

.readiness-badge.readiness-warn {
  color: #1a1a1a;
  background: var(--warning);
  box-shadow: 0 0 8px rgba(255, 217, 61, 0.4);
}

.readiness-badge.readiness-dev {
  width: 18px;
  min-width: 18px;
  padding: 0;
  color: #faa81a;
  background: rgba(250, 168, 26, 0.14);
  border: 1px solid rgba(250, 168, 26, 0.45);
  box-shadow: none;
}

.readiness-banner {
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 0.6rem 0 0.9rem 0;
  border: 1px solid;
}

.readiness-banner-error {
  border-color: rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
}

.readiness-banner-warn {
  border-color: rgba(255, 217, 61, 0.3);
  background: rgba(255, 217, 61, 0.07);
}

.readiness-banner-title {
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.readiness-banner-error .readiness-banner-title {
  color: var(--danger);
}

.readiness-banner-warn .readiness-banner-title {
  color: var(--warning);
}

.readiness-banner-list {
  margin: 0;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.readiness-banner-list b {
  font-weight: 600;
}

.readiness-banner-list span {
  color: var(--text-muted);
}

.field-required-missing {
  border: 1px solid rgba(255, 107, 107, 0.45) !important;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.15);
  padding: 0.55rem 0.7rem !important;
  background: rgba(255, 107, 107, 0.04);
}

.group-required-missing {
  border: 1px solid rgba(255, 107, 107, 0.45) !important;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.15);
  background: rgba(255, 107, 107, 0.04);
}

.required-missing-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--danger);
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-bottom: 0.4rem;
  cursor: help;
}

.module-entry.me-readiness-error {
  border-color: rgba(255, 107, 107, 0.4);
  border-left-color: var(--danger);
}

.module-entry.me-readiness-warn {
  border-left-color: var(--warning);
}

.module-entry.me-readiness-dev {
  border-left-color: #faa81a;
}

/* ── Readiness hover card ── */

.readiness-hover-card {
  position: fixed;
  z-index: 900;
  width: 280px;
  max-width: calc(100vw - 16px);
  background: var(--bg-card, #1e1f22);
  border: 1px solid var(--border, #2b2d31);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  padding: 0.65rem 0.75rem;
  pointer-events: none;
  animation: rhc-in 0.12s ease-out;
}

@keyframes rhc-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

.readiness-hover-card .rhc-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.readiness-hover-card .rhc-item {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  margin-bottom: 0.35rem;
}

.readiness-hover-card .rhc-item:last-of-type {
  margin-bottom: 0.25rem;
}

.readiness-hover-card .rhc-error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.28);
}

.readiness-hover-card .rhc-warn {
  background: rgba(255, 217, 61, 0.08);
  border: 1px solid rgba(255, 217, 61, 0.24);
}

.readiness-hover-card .rhc-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-normal, #dbdee1);
  line-height: 1.3;
}

.readiness-hover-card .rhc-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.35;
}

.readiness-hover-card .rhc-foot {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.75;
  margin-top: 0.3rem;
}

.entry-list-card {
  padding: 0.25rem 0.75rem;
}
.entry-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.entry-icon-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
}
.entry-icon-btn.entry-icon-danger {
  color: #ed4245;
}
.entry-icon-btn.entry-icon-danger:hover {
  background: rgba(237,66,69,0.08);
  border-color: rgba(237,66,69,0.4);
  color: #ed4245;
}
.entry-icon-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.entry-leading {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.entry-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  line-height: 1;
  overflow: hidden;
  flex-shrink: 0;
}
.entry-icon-tile svg {
  width: 16px;
  height: 16px;
}
.entry-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}
.entry-meta {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
.lists-item-entry {
  align-items: center;
  padding: 0.5rem 0.5rem;
  transition: transform 0.15s ease;
}
.lists-emoji-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.lists-emoji-row:first-child {
  margin-top: 0;
}
.lists-emoji-row > div:nth-child(2) {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
}
.lists-item-actions-full { display: inline-flex; align-items: center; gap: 0.3rem; }
.lists-item-actions-compact { display: none; flex-shrink: 0; }
.lists-item-grip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: grab;
  touch-action: none;
}
.lists-item-grip:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.lists-item-entry.lists-item-dragging {
  transition: none;
  position: relative;
  z-index: 5;
  opacity: 0.9;
  background: var(--panel-light);
  box-shadow: 0 10px 28px rgba(0,0,0,0.5);
  pointer-events: none;
}
body.lists-dragging-active {
  user-select: none;
  -webkit-user-select: none;
}

.lists-action-menu {
  position: fixed;
  z-index: 500;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  animation: listsMenuIn 0.12s ease;
}

@keyframes listsMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

.lists-action-menu-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
}

.lists-action-menu-item svg { flex-shrink: 0; opacity: 0.7; }
.lists-action-menu-item:hover { background: rgba(255,255,255,0.05); }
.lists-action-menu-item.is-danger { color: #ed4245; }
.lists-action-menu-item.is-disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* On phones the icon actions squeeze the item text into single
   characters per line, so they collapse into a three dots menu and the
   text clamps to two lines with a tap to expand */
@media (max-width: 768px) {
  .lists-item-entry .lists-item-actions-full { display: none; }
  .lists-item-entry .lists-item-actions-compact { display: inline-flex; }
  .lists-item-entry .lists-item-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
  }
  .lists-item-entry.lists-item-expanded .lists-item-text {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
  }
}
.entry-toggle-slot {
  flex-shrink: 0;
  margin-right: 0.25rem;
}
.forum-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.form-group.field-separator {
  height: 1px;
  margin: 0.9rem 0;
  padding: 0;
  background: var(--border);
  border: none;
}
.field-note-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}
.mod-permission-note {
  margin-bottom: 1rem;
  background: rgba(88, 101, 242, 0.07);
  border-color: rgba(88, 101, 242, 0.22);
  color: var(--text-muted);
}
.format-link-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.format-link-info {
  min-width: 0;
}
.format-link-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.format-link-custom-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: rgba(87,242,135,0.15);
  color: #57F287;
}
.format-link-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.35;
}
@media (max-width: 640px) {
  .format-link-field { flex-direction: column; align-items: stretch; }
  .format-link-field .btn { align-self: flex-start; }
}
.ladder-enable-slot .toggle-slider {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.35);
}
.ladder-enable-slot .toggle-switch input:checked + .toggle-slider {
  background: var(--success);
  border-color: var(--success);
  box-shadow: none;
}
.forum-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.forum-tag-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}
.forum-tag-chip:active {
  transform: translateY(1px);
}
.forum-tag-chip-active {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(88, 101, 242, 0.22);
  box-shadow: inset 0 0 0 1px rgba(88, 101, 242, 0.35);
}
.forum-tag-chip-active:hover {
  color: var(--text);
  border-color: var(--primary);
  background: rgba(88, 101, 242, 0.34);
  box-shadow: inset 0 0 0 1px rgba(88, 101, 242, 0.45);
}
.forum-tag-emoji {
  width: 14px;
  height: 14px;
  margin-right: 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
.forum-tag-emoji-text {
  margin-right: 5px;
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}
.forum-tags-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
}
