/* JavaScript minifier. Hero, content sections, cards, stats and FAQ come from
   tool_page.css; only the interactive panels live here. */

/* The star field behind the hero is a positioned image, so the panels need
   their own stacking context or it swallows every click. */
.jm {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto 56px auto;
  padding: 0 16px;
}

.jm-panel {
  margin-top: 16px;
  padding: 20px;
  border-radius: 16px;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}

.jm-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.jm-panel-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.jm-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.jm-hint {
  margin: 0 0 14px 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 22px;
}

.jm-code {
  display: block;
  width: 100%;
  min-height: 260px;
  padding: 16px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 22px;
  resize: vertical;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  tab-size: 2;
}

.jm-code:focus {
  outline: none;
  border-color: #8c46ff;
  background: rgba(0, 0, 0, 0.46);
}

.jm-code::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.jm.is-invalid .jm-code[data-jm-input] {
  border-color: rgba(255, 122, 122, 0.6);
}

.jm-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 18px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-align: center;
}

.jm-dropzone.is-over {
  border-color: #8c46ff;
  background: rgba(140, 70, 255, 0.14);
  color: #fff;
}

.jm-dropzone i {
  font-size: 20px;
}

.jm-pick {
  color: #c7a6ff;
  text-decoration: underline;
  cursor: pointer;
}

.jm-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.jm-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 13px;
}

.jm-file-name {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.jm-file-size {
  color: rgba(255, 255, 255, 0.55);
}

.jm-file-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  line-height: 1;
}

.jm-file-remove:hover {
  background: rgba(255, 255, 255, 0.24);
}

.jm-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 20px;
}

.jm-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.jm-field > span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

.jm-select {
  padding: 11px 14px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 14px;
}

.jm-select:focus {
  outline: none;
  border-color: #8c46ff;
}

.jm-select option {
  color: #14121a;
}

.jm-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 20px;
  margin-top: 18px;
}

.jm-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}

.jm-check input {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #6e00ff;
  cursor: pointer;
}

.jm-check small {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  line-height: 18px;
}

.jm-error {
  margin: 14px 0 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 0.5px solid rgba(255, 122, 122, 0.45);
  background: rgba(255, 92, 92, 0.12);
  color: #ffc9c9;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 20px;
  word-break: break-word;
}

.jm-status {
  min-height: 20px;
  margin: 12px 0 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  text-align: center;
}

.jm .tp-stats {
  margin-bottom: 16px;
}

.jm-run-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

@media (max-width: 575px) {
  .jm-panel {
    padding: 16px;
  }

  .jm-code {
    min-height: 200px;
    font-size: 13px;
  }
}
