/* mw-wizard.css — shared overrides for modify/edit wizard pages */

/* ── Locked formula display ── */
.mtw-locked-formula {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 11px;
  background: #0f1211;
  border: 1px dashed #2c3031;
  margin-top: 18px;
}

.mtw-formula-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #161c18;
  border: 1px solid #2c6b45;
  color: #5ee08f;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 15px;
}

.mtw-locked-note {
  font-size: 13px;
  color: #7e8481;
  font-style: italic;
  flex: 1;
  text-wrap: pretty;
}

.mtw-locked-icon {
  font-size: 16px;
  color: #f0c95c;
  flex-shrink: 0;
}

/* ── Title with back-link ── */
.mtw-title-link {
  color: #2fcc6b;
  text-decoration: none;
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 3.6vw, 28px);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mtw-title-link:hover { color: #5ee08f; }
.mtw-title-link svg { opacity: 0.75; }

/* ── Save changes button ── */
.mtw-save-btn {
  min-height: 42px;
  padding: 0 26px;
  border-radius: 9px;
  border: 0;
  background: #1c9d52;
  color: #04140a;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}

.mtw-save-btn:hover { background: #25b661; }
.mtw-save-btn:disabled { background: #1c4030; color: #3a6b52; cursor: not-allowed; }

/* ── Undo / Discard ── */
.mtw-history-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.mtw-undo-btn {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  border: 1px solid #2a2e2f;
  background: transparent;
  color: #9aa09d;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.mtw-undo-btn:hover:not(:disabled) { color: #c8ceca; border-color: #3a4040; }
.mtw-undo-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mtw-discard-btn {
  background: none;
  border: none;
  color: #6d7370;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  padding: 0 2px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
.mtw-discard-btn:hover { color: #c45050; }

/* ─�� Danger zone (modifySeries) ── */
.mtw-danger-zone {
  margin-top: 28px;
  padding: 16px 18px;
  border: 1px solid #5b2f33;
  border-radius: 11px;
  background: #1a1112;
}

.mtw-danger-zone-title {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #ffb3b7;
  margin-bottom: 10px;
}

.mtw-danger-btn {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid #7e3238;
  background: transparent;
  color: #ff9fa4;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}

.mtw-danger-btn:hover { background: #2a1416; color: #ffb3b7; }

/* ── Round rows (modifySeries) ── */
.mtw-round-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid #1e2122;
  background: #131415;
  margin-top: 8px;
  flex-wrap: wrap;
}

.mtw-round-row-name {
  flex: 1 1 180px;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
}

.mtw-round-row-meta {
  font-size: 12px;
  color: #7e8481;
}

.mtw-round-row-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  background: #161c18;
  border: 1px solid #23402d;
  color: #5ee08f;
}

.mtw-round-row-status.active {
  background: #16281d;
  border-color: #2c6b45;
  color: #2fcc6b;
}

.mtw-round-row-status.finished {
  background: #1c1e1f;
  border-color: #2c3031;
  color: #7e8481;
}

.mtw-round-link {
  font-size: 13px;
  color: #2fcc6b;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #23402d;
  background: transparent;
  transition: background .12s;
  white-space: nowrap;
}

.mtw-round-link:hover { background: #0e2018; }

.mtw-round-weight {
  width: 70px;
  min-height: 36px;
  background: #161819;
  border: 1px solid #2a2e2f;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
  color: #e8eae9;
  outline: none;
  font-family: inherit;
}

.mtw-round-weight:focus { border-color: #1c9d52; }

/* ── Add round date picker row ── */
.mtw-add-round-form {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #23282a;
  border-radius: 11px;
  background: #131415;
}

.mtw-add-round-title {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 14px;
}

/* ── Series points rows ── */
.mtw-pts-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.mtw-pts-lbl {
  min-width: 56px;
  font-size: 13px;
  color: #9aa09d;
}

.mtw-pts-inp {
  width: 90px;
  min-height: 40px;
  background: #161819;
  border: 1px solid #2a2e2f;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: #e8eae9;
  outline: none;
  font-family: inherit;
}

.mtw-pts-inp:focus { border-color: #1c9d52; }

.mtw-pts-val {
  font-size: 14px;
  font-weight: 600;
  color: #e8eae9;
  min-width: 40px;
}

.mtw-pts-unit {
  font-size: 12px;
  color: #7e8481;
}

.mtw-pts-rm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #2c3031;
  background: transparent;
  color: #7e8481;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.mtw-pts-rm:hover { border-color: #7e3238; color: #ff9fa4; }

.mtw-pts-add-btn {
  margin-top: 12px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #2a2e2f;
  background: transparent;
  color: #9aa09d;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .12s, color .12s;
}

.mtw-pts-add-btn:hover { border-color: #3a4a41; color: #e8eae9; }

/* ── Quick-play player list ── */
.qpw-player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid #1e2122;
  border-radius: 9px;
  background: #131415;
  margin-top: 6px;
}

.qpw-player-num {
  font-size: 12px;
  color: #7e8481;
  min-width: 24px;
  text-align: center;
}

.qpw-player-name {
  flex: 1;
  font-size: 14px;
}

.qpw-player-rm {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #2c3031;
  background: transparent;
  color: #7e8481;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
}

.qpw-player-rm:hover { border-color: #7e3238; color: #ff9fa4; }

.qpw-add-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.qpw-add-input {
  flex: 1;
  min-height: 44px;
  background: #161819;
  border: 1px solid #2a2e2f;
  border-radius: 9px;
  padding: 0 14px;
  font-size: 15px;
  color: #e8eae9;
  outline: none;
  font-family: inherit;
}

.qpw-add-input:focus { border-color: #1c9d52; }

.qpw-add-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 9px;
  border: 0;
  background: #1c9d52;
  color: #04140a;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.qpw-add-btn:hover { background: #25b661; }

.qpw-count-badge {
  font-size: 12px;
  color: #7e8481;
  margin-top: 8px;
}

/* ── Accent color picker ── */
.mtw-accent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.mtw-accent-swatch {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  border: 1px solid #2a2e2f;
  cursor: pointer;
  padding: 0;
  background: transparent;
}

.mtw-hex-input {
  flex: 1;
  min-height: 44px;
  background: #161819;
  border: 1px solid #2a2e2f;
  border-radius: 9px;
  padding: 0 14px;
  width: 128px;
  font-size: 15px;
  color: #e8eae9;
  outline: none;
  font-family: monospace;
}

.mtw-hex-input:focus { border-color: #1c9d52; }

/* ── Flash messages ── */
.mtw-flash {
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 14px;
  margin-bottom: 16px;
}

.mtw-flash-ok {
  background: #0b1610;
  border: 1px solid #1a3326;
  color: #7cb899;
}

.mtw-flash-err {
  background: #1a1112;
  border: 1px solid #5b2f33;
  color: #ffb3b7;
}

/* ── IscrimRTE ───────────────────────────────────────────────────────────── */
.rte-wrap {
  border: 1px solid #2a2e2f;
  border-radius: 9px;
  overflow: hidden;
  transition: border-color .15s;
  background: #0f1011;
}
.rte-wrap:focus-within { border-color: #3d4242; }

.rte-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 5px 8px;
  border-bottom: 1px solid #1e2122;
  background: #131415;
}

.rte-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #9aa09d;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  padding: 3px 8px;
  min-width: 28px;
  text-align: center;
  transition: background .1s, color .1s, border-color .1s;
}
.rte-btn:hover { background: #1e2122; color: #c8ceca; }
.rte-btn.active { background: #1e2122; border-color: #3d4242; color: #e8eae9; }

.rte-sep { width: 1px; height: 16px; background: #2a2e2f; margin: 0 4px; flex-shrink: 0; }

.rte-editor {
  padding: 11px 14px;
  color: #c8ceca;
  font-size: 14px;
  line-height: 1.65;
  font-family: inherit;
  outline: none;
  word-break: break-word;
}
.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: #4a5350;
  pointer-events: none;
  display: block;
}
.rte-editor p            { margin: 0 0 6px; }
.rte-editor p:last-child { margin-bottom: 0; }
.rte-editor ul,
.rte-editor ol           { padding-left: 20px; margin: 4px 0; }
.rte-editor li           { margin: 2px 0; }
.rte-editor strong       { font-weight: 700; }
.rte-editor em           { font-style: italic; }
.rte-editor a            { color: #2fcc6b; text-decoration: underline; }
.rte-editor a:hover      { color: #3fe07a; }
.rte-editor h2           { font-size: 20px; font-weight: 700; margin: 6px 0 4px; color: #e2e8e5; line-height: 1.3; }
.rte-editor h2:last-child { margin-bottom: 0; }
.rte-editor h3           { font-size: 16px; font-weight: 600; margin: 5px 0 3px; color: #d4dbd7; line-height: 1.3; }
.rte-editor h3:last-child { margin-bottom: 0; }
