/* =====================================================================
   style.css — エンコード・変換オールインワン ツール固有の微調整のみ。
   共通スタイルは /_shared/shirugear.css に任せる（結果表示は sg-result）。
   ===================================================================== */

/* 入力カード下のアクション */
.es-actions {
  margin-top: var(--sg-space-3, 12px);
  display: flex;
  justify-content: flex-end;
}
.es-clear {
  appearance: none;
  border: 1px solid var(--sg-border, #e2e6ee);
  background: var(--sg-surface, #fff);
  color: var(--sg-muted, #555);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}
.es-clear:hover {
  background: var(--sg-hover, #f1f3f9);
}

/* 結果カードのグリッド（広い画面は2列） */
.es-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sg-space-3, 14px);
  margin-top: var(--sg-space-3, 14px);
}
@media (min-width: 720px) {
  .es-grid {
    grid-template-columns: 1fr 1fr;
  }
  .es-span2 {
    grid-column: 1 / -1;
  }
}
/* グリッド内では各 sg-result の上マージンを打ち消す */
.es-grid > .sg-result {
  margin-top: 0;
}

/* カード見出し（ラベル + 方向トグル） */
.es-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.es-head .sg-result__label {
  margin: 0;
}
.es-sub {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--sg-muted, #777);
}

/* 方向トグル */
.es-toggle {
  display: inline-flex;
  gap: 4px;
}
.es-toggle .sg-toggle {
  font-size: 0.8rem;
  padding: 3px 10px;
}

/* 結果テキストはコード的に折り返す */
.es-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  margin: var(--sg-space-2, 8px) 0 0;
}
.es-code.is-error {
  color: var(--sg-danger, #c0392b);
  font-family: inherit;
  word-break: normal;
}

/* シーザーのずらし数入力 */
.es-shift-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--sg-space-2, 8px);
}
.es-shift-field .sg-label {
  margin: 0;
  font-size: 0.85rem;
  white-space: nowrap;
}
.es-shift-input {
  width: 6em;
}

/* ハッシュ行 */
.es-hash-row {
  display: grid;
  grid-template-columns: 5.5em 1fr auto;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 0;
  border-top: 1px solid var(--sg-border, #e5e7eb);
}
.es-hash-row:first-of-type {
  border-top: none;
}
.es-hash-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--sg-muted, #555);
}
.es-hash-row .es-code {
  margin: 0;
}
.es-hash-copy {
  align-self: center;
}
@media (max-width: 480px) {
  .es-hash-row {
    grid-template-columns: 1fr auto;
  }
  .es-hash-name {
    grid-column: 1 / -1;
  }
}
