/* ================================================================
   MODAL - Multitint Builder overlay
   ================================================================ */

/* Multitint button in the meta actions strip */
.btn-multi {
  background: transparent;
  border: 1px solid rgba(128,238,192,.2);
  border-radius: 4px;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 8px 20px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-multi:hover    { border-color: rgba(128,238,192,.45); color: var(--ice); background: rgba(128,238,192,.05); }
.btn-multi:disabled { opacity: .18; cursor: default; }

/* ── Backdrop ── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,8,18,.72);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal-backdrop.open { display: flex; }

/* ── Box ── */
.modal-box {
  background: #020f1e;
  border: 1px dashed rgba(128,238,192,.18);
  border-radius: 10px;
  padding: 24px 26px 22px;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Header ── */
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  transition: color .15s;
}
.modal-close:hover { color: var(--ice); }

/* ── Description ── */
.modal-desc {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Solid-tint palette ── */
.multi-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.multi-palette-swatch {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: border-color .12s, transform .1s;
  flex-shrink: 0;
}
.multi-palette-swatch:hover {
  border-color: var(--ice);
  transform: scale(1.15);
}
.multi-palette-swatch.used {
  opacity: .25;
  cursor: not-allowed;
  transform: none;
  border-color: transparent;
}

/* ── Sequence section ── */
.multi-seq-label {
  font-size: 11px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(128,238,192,.4);
  margin-top: 2px;
}

.multi-sequence {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 36px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.multi-seq-empty {
  font-size: 10px;
  color: var(--muted);
  font-style: italic;
  padding: 6px 0;
}

.multi-seq-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.multi-seq-swatch {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1.5px solid rgba(128,238,192,.15);
}

.multi-seq-name {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

/* Up / Down / Delete buttons */
.multi-row-btns {
  display: flex;
  gap: 4px;
}
.multi-row-btn {
  background: none;
  border: 1px solid rgba(128,238,192,.12);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10px;
  padding: 3px 6px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  line-height: 1;
}
.multi-row-btn:disabled { opacity: .25; cursor: default; pointer-events: none; }
.multi-row-btn:hover     { border-color: var(--ice);   color: var(--ice);   }
.multi-row-btn.del:hover { border-color: #ff5555;       color: #ff5555;       }

/* ── Modal action buttons ── */
.modal-actions {
  display: flex;
  gap: 8px;
}
.modal-btn-primary {
  background: var(--ice);
  border: none;
  border-radius: 4px;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 9px 22px;
  cursor: pointer;
  transition: background .15s;
}
.modal-btn-primary:hover    { background: #C0EEFF; }
.modal-btn-primary:disabled { opacity: .25; cursor: default; }

.modal-btn-secondary {
  background: transparent;
  border: 1px solid rgba(128,238,192,.2);
  border-radius: 4px;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 9px 22px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.modal-btn-secondary:hover    { border-color: rgba(128,238,192,.45); color: var(--ice); background: rgba(128,238,192,.05); }
.modal-btn-secondary:disabled { opacity: .25; cursor: default; }
