/* Code Share — native tools-shell (без iframe PrivateBin) */

.mg-cs__form {
  margin-top: 28px;
}

.mg-cs__textarea {
  min-height: 280px;
}

.mg-cs__opts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin-top: 16px;
}

.mg-cs__opt--grow {
  grid-column: 1 / -1;
}

/* select/input — shell `.mg-tool__select` / `.mg-tool__input` */
.mg-cs__select,
.mg-cs__input {
  display: block;
  width: 100%;
  flex: none;
  font-weight: 600;
}

.mg-cs__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--mg-black, #000);
  cursor: pointer;
}

.mg-cs__check input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--mg-blue-link, #0062ad);
}

.mg-cs__hint {
  margin-top: 14px;
  max-width: 56ch;
}

.mg-cs__results {
  margin-top: 28px;
  max-width: 820px;
  padding: 22px 24px;
  background: var(--mg-cream, #f2eeeb);
  border: 1px solid var(--mg-border, #e3e5ea);
  border-radius: 3px;
}

.mg-cs__results-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mg-muted, #6b6560);
}

.mg-cs__url {
  margin: 0 0 16px;
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 700;
  word-break: break-all;
  color: var(--mg-black, #000);
}

.mg-cs__share {
  margin-top: 4px;
}

.mg-cs__steps {
  margin: 0;
  padding-left: 1.25em;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--mg-black, #000);
}

.mg-cs__steps li + li {
  margin-top: 10px;
}

.mg-cs__muted {
  margin: 20px 0 0;
  max-width: 640px;
}

.mg-cs__cta {
  margin: 28px 0 0;
}

/* Open / view mode */
.mg-cs--view #mg-cs-about {
  display: none;
}

.mg-cs__view-meta {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--mg-muted, #6b6560);
}

.mg-cs__gate {
  margin-top: 28px;
  max-width: 420px;
  padding: 22px 24px;
  background: var(--mg-cream, #f2eeeb);
  border: 1px solid var(--mg-border, #e3e5ea);
  border-radius: 3px;
}

.mg-cs__gate-title {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
}

.mg-cs__gate-text {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.mg-cs__gate-pass {
  margin-bottom: 16px;
}

.mg-cs__view-pre {
  margin: 24px 0 0;
  padding: 20px 22px;
  max-width: 960px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--mg-border, #e3e5ea);
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--mg-black, #000);
}

.mg-cs__view-pre:empty {
  display: none;
}

.mg-cs__view-actions {
  margin-top: 20px;
}

@media (max-width: 640px) {
  .mg-cs__opts {
    grid-template-columns: 1fr;
  }

  .mg-cs__textarea {
    min-height: 220px;
  }
}
