/**
 * 資料ダウンロードの紹介・請求・完了画面を整える。
 * 既存のSWELLブロックとフォームの共通書式を継承する。
 */
.roboa-download-complete {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid #d7e5ee;
  border-radius: 12px;
  background: #f3f8fc;
  text-align: center;
}
.roboa-download-complete [hidden] {
  display: none !important;
}
.roboa-download-button {
  display: inline-block;
  padding: 16px 28px;
  border: 0;
  border-radius: 6px;
  background: #006ed1;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.roboa-download-button:hover {
  background: #0055a2;
}
.roboa-download-complete .roboa-download-button {
  margin-block: 1.5em;
}
.roboa-download-button:focus-visible {
  outline: 3px solid #173d5e;
  outline-offset: 4px;
}
.roboa-download-request .wpcf7 form.sent .wpcf7-response-output {
  display: none;
}
.roboa-download-request textarea[name="your-message"] {
  line-height: 1.5;
  height: calc(7.5em + 1rem + 2px);
}
.roboa-cf7 .roboa-download-demo .form-label {
  margin-bottom: 1em;
}
.roboa-download-request select {
  width: 100%;
  min-height: 48px;
}

/* 資料一覧と機種別紹介。本文と画像はWordPressの標準ブロックで管理。 */
.roboa-catalog-grid > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.roboa-catalog-grid .roboa-catalog-card {
  margin: 0;
  padding: 24px;
  border: 1px solid #dce5eb;
  border-radius: 12px;
  background: #fff;
}
.roboa-catalog-card .roboa-catalog-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 230px;
  margin: 0 0 24px;
  padding: 12px;
  background: #f3f6f8;
}
.roboa-catalog-card .roboa-catalog-cover img {
  width: auto;
  max-width: 100%;
  max-height: 206px;
  object-fit: contain;
}
.roboa-catalog-detail {
  padding-top: 32px;
  align-items: center;
}
.roboa-catalog-detail .roboa-catalog-cover {
  text-align: center;
}
.roboa-catalog-detail .roboa-catalog-cover img {
  width: auto;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
}
.roboa-catalog-detail .wp-block-button__link {
  background: #006ed1;
  color: #fff;
  font-weight: 700;
}
.roboa-download-request .roboa-submit-download {
  background: linear-gradient(100deg, #009245 0%, #06c755 100%);
  color: #fff;
  font-weight: 700;
}
.roboa-catalog-detail .wp-block-button__link:focus-visible,
.roboa-download-request .roboa-submit-download:focus-visible {
  outline: 3px solid #173d5e;
  outline-offset: 4px;
}
@media (max-width: 959px) {
  .roboa-catalog-grid > .wp-block-group__inner-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.roboa-catalog-card h3 { position: static; margin: 0; padding: 0; border: 0; font-size: 20px; }
.roboa-catalog-card h3::before, .roboa-catalog-card h3::after { display: none; }
.roboa-catalog-grid .roboa-catalog-card { position: relative; transition: border-color .2s, box-shadow .2s; }
.roboa-catalog-card .roboa-catalog-card-link { color: inherit; text-decoration: none; }
.roboa-catalog-card-link::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.roboa-catalog-grid .roboa-catalog-card:hover,
.roboa-catalog-grid .roboa-catalog-card:focus-within { border-color: #006ed1; box-shadow: 0 4px 16px #006ed11a; }
.roboa-catalog-card-link:focus-visible { outline: none; }
.roboa-catalog-card-link:focus-visible::after { outline: 3px solid #006ed1; outline-offset: 3px; }
.roboa-catalog-detail .wp-block-button__link:hover { background: #0055a2; }

/* スマホでも2列を維持し、カード内の余白と文字を幅に合わせる。 */
@media (max-width: 599px) {
  .roboa-catalog-grid > .wp-block-group__inner-container {
    gap: 12px;
  }
  .roboa-catalog-grid .roboa-catalog-card {
    padding: 12px;
  }
  .roboa-catalog-card .roboa-catalog-cover {
    height: clamp(120px, 36vw, 180px);
    margin-bottom: 12px;
    padding: 8px;
  }
  .roboa-catalog-card .roboa-catalog-cover img {
    max-height: 100%;
  }
  .roboa-catalog-card h3 {
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  .roboa-catalog-detail .roboa-catalog-cover img {
    max-height: 340px;
  }
}

/* 申込みは案内とフォームを分け、資料カードはフォーム自体の幅で列数を変える。 */
.roboa-download-layout {
  align-items: flex-start;
  gap: clamp(24px, 4vw, 48px);
}
.roboa-download-layout > .wp-block-column {
  min-width: 0;
}
.roboa-download-guide {
  padding-top: 16px;
}
.roboa-download-guide li + li {
  margin-top: 12px;
}
.roboa-download-form-panel {
  container: roboa-download-form / inline-size;
  padding: clamp(16px, 2.5vw, 32px);
}
.roboa-download-form-panel .roboa-cf7 {
  padding-top: 0;
}
.roboa-download-choices {
  min-width: 0;
  padding: 0;
  border: 0;
}
.roboa-download-choice-help {
  margin: 8px 0 16px;
  font-size: 14px;
}
.roboa-download-choices .roboa-download-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.roboa-download-choices .wpcf7-list-item {
  min-width: 0;
  margin: 0;
}
.roboa-download-choices label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 10px 6px;
  height: 100%;
  padding: 12px;
  border: 2px solid #dce5eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.roboa-download-choices label:hover,
.roboa-download-choices label:has(input:checked) {
  border-color: #006ed1;
  background: #f0f7ff;
}
.roboa-download-choices label:focus-within {
  outline: 2px solid #173d5e;
  outline-offset: 2px;
}
.roboa-download-choices label > img {
  grid-column: 1 / -1;
  width: 100%;
  height: 140px;
  object-fit: contain;
}
.roboa-download-choices input[type="checkbox"] {
  margin: 2px 0 0;
  accent-color: #006ed1;
}
.roboa-download-choices .wpcf7-list-item-label {
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.roboa-download-choices .wpcf7-list-item-label::before,
.roboa-download-choices .wpcf7-list-item-label::after {
  content: none;
}
@container roboa-download-form (min-width: 600px) {
  .roboa-download-choices .roboa-download-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 959px) {
  /* SWELLのカラム境界より早く縦積みにして、入力欄の幅を確保する。 */
  .roboa-download-layout.wp-block-columns {
    flex-direction: column;
  }
  .roboa-download-layout > .wp-block-column {
    flex-basis: auto !important;
    width: 100%;
  }
}
@media (max-width: 599px) {
  .roboa-download-layout {
    gap: 24px;
  }
  .roboa-download-guide {
    padding-top: 0;
  }
  .roboa-download-form-panel {
    padding: 16px 12px;
  }
  .roboa-download-choices .roboa-download-choice-grid {
    gap: 8px;
  }
  .roboa-download-choices label {
    gap: 8px 4px;
    padding: 8px;
  }
  .roboa-download-choices label > img {
    height: 110px;
  }
  .roboa-download-choices .wpcf7-list-item-label {
    font-size: 12px;
  }
}
