/*
 * Download search and results only. The surrounding page (header/footer and
 * global typography) is intentionally not styled here.
 * This stylesheet is scoped to .w-dl-content to avoid collisions with site CSS.
 */

.w-dl-content {
  --w-dl-red: #a9092d;
  --w-dl-red-hover: #850520;
  --w-dl-text: #172638;
  --w-dl-subtext: #5c6b7b;
  --w-dl-line: #dce3ea;
  --w-dl-tint: #f3f6f9;
  color: var(--w-dl-text);
  font-family: inherit;
}

.w-dl-content *,
.w-dl-content *::before,
.w-dl-content *::after { box-sizing: border-box; }

.w-dl-content h2,
.w-dl-content h3,
.w-dl-content h4,
.w-dl-content p { margin-top: 0; }

/* Search */
.w-dl-content .w-search {
  border: 1px solid #d5dfe8;
  background: #f9fbfd;
  border-radius: 6px;
  padding: 20px 24px 21px;
  margin: 0;
}

.w-dl-content .w-search-title {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  margin: 0 0 13px;
}

.w-dl-content .w-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 158px;
  align-items: end; /* Align the button bottom with the input/select fields. */
  gap: 12px;
  margin: 0;
}

.w-dl-content .w-search-row .form-group {
  min-width: 0;
  margin: 0;
}

.w-dl-content .w-form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 6px;
}

.w-dl-content .w-search-row .form-control {
  display: block;
  width: 100%;
  height: 43px;
  margin: 0;
  padding: 8px 11px;
  color: #263342;
  background-color: #fff;
  border: 1px solid #c3cfda;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.w-dl-content .w-search-row .form-control:focus {
  outline: 2px solid #e9b5c2;
  outline-offset: 1px;
}

.w-dl-content .w-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  width: 100%;
  height: 43px;
  min-height: 43px;
  margin: 0;
  padding: 0 10px;
  gap: 7px;
  border: 1px solid var(--w-dl-red);
  border-radius: 5px;
  background: var(--w-dl-red);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}

.w-dl-content .w-search-submit:hover {
  color: #fff;
  background: var(--w-dl-red-hover);
  border-color: var(--w-dl-red-hover);
}

/* Results: keep these in the same section as the form; no extra pb-5 gap. */

.w-dl-content .w-results-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 24px 0 13px;
  padding: 0;
}

.w-dl-content .w-results-head h2 {
  font-size: 21px;
  line-height: 1.4;
  margin: 0;
  font-weight: 700;
}

.w-dl-content .w-product {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--w-dl-line);
  border-radius: 7px;
  box-shadow: 0 3px 12px rgba(20, 40, 60, .05);
  margin: 0 0 18px;
}

.w-dl-content .w-product-header {
  background: var(--w-dl-tint);
  border-bottom: 1px solid var(--w-dl-line);
  padding: 18px 24px 16px;
}

.w-dl-content .w-product-header h3 {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

/* Group: do not reuse the site's generic .w-section class. */

.w-dl-content .w-dl-group {
  margin: 0;
  padding: 48px 24px 0;
}

.w-dl-content .w-dl-group + .w-dl-group {
  padding-top: 76px;
  padding-bottom: 22px;
}

.w-dl-content .w-dl-group:last-child { padding-bottom: 22px; }

.w-dl-content .w-dl-group-title {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0 0 0 11px;
  border: 0;
  border-left: 4px solid var(--w-dl-red);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}

.w-dl-content .w-file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.w-dl-content .w-file {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 70px;
  padding: 11px 0;
  margin: 0;
  border-bottom: 1px solid var(--w-dl-line);
}

.w-dl-content .w-file-list > .w-file:last-child { border-bottom: 1px solid var(--w-dl-line); }

.w-dl-content .w-file-body {
  flex: 1 1 auto;
  min-width: 0;
}

/* ダウンロード項目のマウスオーバー */
.w-dl-content .w-file {
  transition: background-color 0.2s ease;
}

.w-dl-content .w-file:hover,
.w-dl-content .w-file:focus-within {
  background-color: #f1f4f7;
}

.w-dl-content .w-file-title {
  margin: 0 0 2px !important; /* Override Bootstrap 4 mb-1. */
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.w-dl-content .w-file-desc {
  margin: 0;
  color: var(--w-dl-subtext);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.w-dl-content .w-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 158px;
  width: 158px;
  min-width: 158px;
  min-height: 42px;
  padding: 10px 12px;
  gap: 7px;
  border-radius: 5px;
  background: var(--w-dl-red);
  border: 1px solid var(--w-dl-red);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  transition: background-color .15s;
}

.w-dl-content .w-download:hover {
  background: var(--w-dl-red-hover);
  border-color: var(--w-dl-red-hover);
  color: #fff;
  text-decoration: none;
}

.w-dl-content .w-download:focus-visible,
.w-dl-content .w-search-submit:focus-visible {
  outline: 3px solid #ecb2c2;
  outline-offset: 2px;
}

.w-dl-content .w-dl-icon {
  flex: none;
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 767.98px) {
  .w-dl-content .w-search { padding: 17px 16px; }

  .w-dl-content .w-search-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .w-dl-content .w-results-head {
    display: block;
    margin-top: 23px;
  }

  .w-dl-content .w-product-header { padding: 16px; }

  .w-dl-content .w-product-header h3 { font-size: 19px; }

  .w-dl-content .w-dl-group { padding: 30px 16px 0; }

  .w-dl-content .w-dl-group + .w-dl-group {
    padding-top: 78px;
    padding-bottom: 18px;
  }

  .w-dl-content .w-dl-group:last-child { padding-bottom: 18px; }

  .w-dl-content .w-file {
    display: block;
    min-height: 0;
    padding: 13px 0 15px;
  }

  .w-dl-content .w-download {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 43px;
    margin-top: 12px;
  }

}
/* ダウンロード項目の左右余白 */
.w-dl-content .w-file {
  padding-left: 12px;
  padding-right: 12px;
}