/* Asia/Tokyo, 2025-11-28 12:00(UTC+09:00) request.css */
:root {
  --field-wide: 320px;
  --product-col-type: 22rem;
  --product-col-price: 18rem;
  --product-col-name: 32rem;
  --fs-base: clamp(1.5rem, 1.3rem + 0.35vw, 1.7rem);
  --fs-note: clamp(1.5rem, 1.3rem + 0.35vw, 1.7rem);
  --fs-heading: clamp(2rem, 1.8rem + 0.5vw, 2.5rem);
  --fs-button: clamp(1.6rem, 1.4rem + 0.4vw, 1.9rem);
  --fs-small: clamp(1.1rem, 1rem + 0.2vw, 1.3rem);
}

.request-section {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

/* フィールドセット全体 */
.form-fieldset {
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  padding: 0.6rem 1.2rem 1.2rem;
  background: #fff;
  font-size: var(--fs-base);
  margin-top: 1.6rem;
}

.form-fieldset > legend {
  font-weight: 700;
  color: #0057a4;
  padding: 0 0.4rem;
  font-size: var(--fs-heading);
}

.note {
  color: #383838;
  margin: 0.4rem 0 0;
  font-size: var(--fs-note);
}

.note--lead {
  margin: -0.4rem 0 1.6rem;
}

.text-red {
  color: #c60000;
}

label {
  display: inline-block;
  margin-bottom: 0.2rem;
  font-size: var(--fs-base);
}

/* 入力要素 */
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #9c9e9c;
  border-radius: 0.5rem;
  font: inherit;
  background: #fff;
}

.product-type-select {
  width: max-content;
  max-width: 100%;
}

.product-price-input {
  text-align: right;
}

textarea {
  min-height: 120px;
  resize: vertical;
}
.name-input-center {
  text-align: center;
}
.auto-resize-textarea {
  resize: none;
  overflow: hidden;
}

.form-row {
  display: grid;
  gap: 0.8rem;
  align-items: flex-start;
  margin-top: 0.8rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.4rem;
}

/* エラー表示 */
.field-prompt,
.form-error {
  color: #c60000;
  font-weight: 600;
  font-size: var(--fs-note);
  margin-top: 0.4rem;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #d93025;
  background: #fff6f6;
  box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.12);
}

/* 商品テーブル（機体・付属品） */
.product-table {
  margin-top: 0.8rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.product-header,
.product-row {
  display: grid;
  grid-template-columns:
    minmax(var(--product-col-type), 1.6fr)
    minmax(var(--product-col-price), 1.2fr)
    minmax(var(--product-col-name), 3fr);
  gap: 0;
}

.product-header > div,
.product-row > div {
  padding: 0.6rem 0.8rem;
  border-right: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

.product-row > div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.product-row > div > select,
.product-row > div > input[type="text"] {
  width: 100%;
  min-height: 4.4rem;
}

.product-header {
  background: #e8f5ff;
  font-weight: 700;
  font-size: var(--fs-base);
}

.product-header-example {
  font-weight: 400;
}

.product-header > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.3rem;
}

.product-header div:last-child {
  text-align: center;
}

.product-header > div:last-child,
.product-row > div:last-child {
  border-right: 0;
}

.product-row:last-child > div {
  border-bottom: 0;
}

.product-row:nth-child(2n + 1) {
  background: #f9fcff;
}

.product-row:nth-child(2n) {
  background: #ffffff;
}

.product-additional {
  border-top: 1px solid #e0e0e0;
}

.product-more {
  margin-top: 0.8rem;
  text-align: left;
}

.product-more-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  background: linear-gradient(135deg, #0075c9, #00a4e4);
  padding: 0.85rem 1.6rem;
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-base);
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 117, 201, 0.22);
  transition: transform 0.08s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}

.product-more-button::after {
  content: "≫≫≫≫≫";
  font-size: var(--fs-small);
}

.product-more-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 117, 201, 0.26);
}

.product-more-button:active {
  transform: translateY(0);
  opacity: 0.9;
}

.product-more-button:focus-visible {
  outline: 3px solid rgba(0, 117, 201, 0.35);
  outline-offset: 2px;
}

/* 送信ボタン周り */
.form-actions {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 2rem;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: var(--fs-button);
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #12b36e, #0e8e59);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(8, 120, 73, 0.25),
    0 2px 6px rgba(8, 120, 73, 0.18);
  transition: transform 0.06s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-submit--xl {
  padding: 1.3rem 2.6rem;
  font-size: var(--fs-button);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(8, 120, 73, 0.28),
    0 3px 8px rgba(8, 120, 73, 0.2);
}

.btn-submit:active {
  transform: translateY(0);
  opacity: 0.9;
}

#requestForm .btn-submit--alert {
  background: #c9302c !important;
  color: #ffe680 !important;
}

/* テストメール */
.testmail-actions {
  margin-top: 1rem;
}

.btn-testmail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 8px;
  border: 0;
  font-weight: 700;
  font-size: var(--fs-button);
  background: #0075c9;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.06s ease, opacity 0.2s ease, background 0.15s ease;
}

.btn-testmail:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.btn-testmail:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-testmail--success {
  background: #12b36e;
}

.testmail-note {
  margin-top: 0.6rem;
  font-size: var(--fs-note);
  color: #333;
}

.testmail-result {
  margin-top: 0.8rem;
  font-size: var(--fs-note);
  line-height: 1.6;
}

/* 強調（迷惑メールなど） */
.spam-red {
  color: #c60000;
  font-weight: 700;
}

.spam-blue {
  color: #1d65eb;
  font-weight: 700;
}

/* メール確認前ロック状態 */
.lock-after-email {
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

#requestForm[data-locked-after-email="1"] #sendBtn {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 送信中オーバーレイ */
.submit-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(6px);
  -webkit-backdrop-filter: saturate(180%) blur(6px);
  z-index: 4000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.submit-overlay.is-show {
  opacity: 1;
}

.submit-overlay__inner {
  text-align: center;
}

.submit-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: #117713;
  animation: rqs-spin 0.9s linear infinite;
  margin: 0 auto 1rem;
}

.submit-text {
  font-size: var(--fs-base);
  color: #333;
  font-weight: 700;
  letter-spacing: 0.04em;
}

@keyframes rqs-spin {
  to {
    transform: rotate(360deg);
  }
}

.small {
  font-size: var(--fs-14);
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  select,
  textarea {
    padding: 0.5rem 0.6rem;
  }

  .product-type-select {
    width: 100%;
  }

  .product-header > div,
  .product-row > div {
    border-right: 0;
  }

  .product-row:last-child > div {
    border-bottom: 0;
  }

  .product-header,
  .product-row {
    grid-template-columns: 1fr;
  }

  .product-header {
    display: none;
  }

  .product-row > div {
    position: relative;
    padding-top: 0.2rem;
  }

  .product-row > div::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: var(--fs-14);
    margin-bottom: 0.2rem;
    color: #333;
  }
}

@media (max-width: 480px) {
  .request-section {
    margin-top: 1rem;
  }

  .form-fieldset {
    padding: 0.6rem 0.8rem 1rem;
  }
}

#requestForm input,
#requestForm select,
 textarea {
  background-color: #efefef;
}
#requestForm input:not([type="hidden"]):focus,
#requestForm select:focus,
#requestForm textarea:focus {
  background-color: #fff3a0;
  border-color: #e0b600;
  box-shadow: 0 0 0 2px rgba(224, 182, 0, 0.35);
}
/* Asia/Tokyo, 2025-12-04  (UTC+09:00) request.css 名前フィールド幅調整 */
@media (min-width: 769px) {
  /* 名前フィールドの grid-2 を上書きして幅を現状の1/3へ */
  .form-fieldset .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 0.25fr));
  }
    #email {
    max-width: 50%;
  }
}
