/* ============================================================
   sample-request.css
   /sample-request/ 配下ページスタイル
   ============================================================ */


/* ── Intro ──────────────────── */
.sr-intro {
  font-size: var(--text-md);
  font-weight: var(--font-light);
  color: var(--color-text);
}


/* ── Section title (subsection heading within this page) ──────────────────── */
.sr-section-title {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  color: var(--color-text-dark);
}

.sr-section-title:first-child {
  margin-top: 0;
}

.sr-section-title--center {
  text-align: center;
}


/* ── Terms / Notes card ──────────────────── */
.sr-terms-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
}

.sr-terms-card__lead {
  margin: 0 0 var(--space-md);
  font-size: var(--text-md);
  font-weight: var(--font-light);
  color: var(--color-text);
}

.sr-terms-card__list  li {
  position: relative;
  padding-left: var(--space-sm);
  font-size: var(--text-md);
  font-weight: var(--font-light);
  color: var(--color-text);
}

.sr-terms-card__list  li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}


/* ── Country Selector Card ──────────────────── */
.sr-selector-card {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.sr-selector-card__title {
  margin-top: 0;
  margin-bottom: var(--space-sm);
}

.sr-selector-card__desc {
  font-size: var(--text-body);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.sr-selector-card__submit {
  display: flex;
  justify-content: center;
  margin-top: var(--space-lg);
}

.sr-selector-card__submit .wp-block-button__link {
  min-width: 300px;
}


/* ── Select (dropdown) ──────────────────── */
/* 基本スタイルは forms.css の .td-select-wrap / .td-select を参照 */

.sr-selector-card .td-select-wrap {
  margin-bottom: var(--space-md);
}


/* ── Applicable products grid ──────────────────── */
.sr-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 var(--space-lg);
  padding: 0;
  list-style: none;
}

.sr-product-check {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  height: 100%;
  background: linear-gradient(to bottom, var(--color-bg-white), var(--color-bg-light));
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.sr-product-check:hover {
  border-color: var(--color-border-ruminous);
  box-shadow: 0 0 8px rgba(27, 143, 203, 0.5);
}

.sr-product-check input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.sr-product-check__box {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--color-bg-white);
  border: 1px solid var(--color-text-muted);
  border-radius: var(--radius-sm);
}

.sr-product-check input:checked + .sr-product-check__box {
  background: linear-gradient(180deg, var(--color-primary) 0%, #007AB7 100%);
  border-color: var(--color-primary);
}

.sr-product-check input:checked + .sr-product-check__box::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 10.5px;
  transform: translate(-50%, -50%);
  background-color: #fff;
  mask: url('/assets/images/common/icon/icon_checkbox.svg') center / contain no-repeat;
  -webkit-mask: url('/assets/images/common/icon/icon_checkbox.svg') center / contain no-repeat;
}

.sr-product-check__label {
  display: flex;
  flex-direction: column;
  font-size: var(--text-xs);
  line-height: 1.3;
}

.sr-product-check__cat {
  color: var(--color-text-sub);
}

.sr-product-check__name {
  color: var(--color-text-dark);
}

.sr-product-check:has(input:checked) {
  border-color: var(--color-primary);
  /*box-shadow: 0 0 2px rgba(27, 143, 203, 0.5);*/
}

.sr-product-check:has(input:checked) .sr-product-check__cat,
.sr-product-check:has(input:checked) .sr-product-check__name {
  color: var(--color-primary);
  font-weight: var(--font-medium);
}


/* ── Form required note ──────────────────── */
.sr-form-required-note {
  font-size: var(--text-sm);
  color: var(--color-error);
  margin-top: var(--space-sm);
  font-weight: var(--font-light);
}


/* ── Form Card ──────────────────── */
/* フォームカードは forms.css の .td-form-card を参照 */


/* ── Form Section (label + content 2-column) ──────────────────── */
.sr-form-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.sr-form-section:first-child {
  padding-top: 0;
}

.sr-form-section:last-child {
  padding-bottom: 0;
}

.sr-form-section__label h3 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: var(--text-lg);
}


/* ── Selected product list ──────────────────── */
.sr-product-list {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.sr-product-chip {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(to bottom, var(--color-bg-white), var(--color-bg-light));
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  flex: 1;
  min-width: 240px;
}

.sr-product-chip__box {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--color-text-muted);
  border: 1px solid var(--color-text-muted);
  border-radius: var(--radius-sm);
}

.sr-product-chip__box::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 10.5px;
  transform: translate(-50%, -50%);
  background-color: #fff;
  mask: url('/assets/images/common/icon/icon_checkbox.svg') center / contain no-repeat;
  -webkit-mask: url('/assets/images/common/icon/icon_checkbox.svg') center / contain no-repeat;
}

.sr-product-chip__label {
  display: flex;
  flex-direction: column;
  font-size: var(--text-xs);
  line-height: 1.3;
}

.sr-product-chip__cat {
  color: var(--color-text-sub);
}

.sr-product-chip__name {
  color: var(--color-text-dark);
}


/* ── Selected country display ──────────────────── */
.sr-selected-country {
  font-size: var(--text-body);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.sr-selected-country__value {
  color: var(--color-text-dark);
  font-weight: var(--font-regular);
}


/* ── Form submit button ──────────────────── */
.sr-form__submit {
  min-width: 420px;
}


/* ── Go back link ──────────────────── */
.sr-back-link {
  margin-top: var(--space-md);
}

.sr-back-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--color-primary);
  font-weight: var(--font-medium);
  font-size: var(--text-body);
  text-decoration: underline;
  transition: text-decoration var(--transition-fast);
}

.sr-back-link a::before {
  content: '';
  width: 14px;
  height: 12px;
  flex-shrink: 0;
  background-color: var(--color-primary);
  mask: url('/assets/images/common/icon/icon_arrow.svg') center / contain no-repeat;
  -webkit-mask: url('/assets/images/common/icon/icon_arrow.svg') center / contain no-repeat;
  transform: rotate(180deg);
}

.sr-back-link a:hover {
  text-decoration: none;
}


/* ── Confirm table (label / value rows) ──────────────────── */
.sr-confirm-table {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin: 0;
  padding: 0;
}

.sr-confirm-table__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: baseline;
  gap: var(--space-sm);
  padding: 14px var(--space-md);
  border-top: 1px solid var(--color-border);
}

.sr-confirm-table__row:first-child {
  border-top: none;
}

.sr-confirm-table__label {
  font-size: var(--text-body);
  color: var(--color-text-sub);
  font-weight: var(--font-light);
  text-align: right;
  margin: 0;
}

.sr-confirm-table__value {
  font-size: var(--text-body);
  color: var(--color-text-dark);
  font-weight: var(--font-regular);
  margin: 0;
  padding: 0;
}


/* ── Confirm action buttons ──────────────────── */
.sr-confirm-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.sr-confirm-actions > * {
  flex: 0 1 30%;
}


/* ── Responsive ──────────────────── */
@media (max-width: 1024px) {
  .sr-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .sr-selector-card,
  .sr-terms-card {
    padding: var(--space-md);
  }

  .sr-form-section {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .sr-confirm-table__row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
  }

  .sr-confirm-table__label {
    text-align: left;
    font-size: var(--text-sm);
  }

  .sr-confirm-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
  }

  .sr-confirm-actions > * {
    width: 80%;
  }
}

@media (max-width: 600px) {
  .sr-product-list {
    flex-direction: column;
  }

  .sr-products-grid {
    grid-template-columns: 1fr;
  }

  .sr-form__submit {
    min-width: 100%;
  }
}


/* ── Thanks ──────────────────── */
/* サンクスメッセージは forms.css の .td-form-thanks-message を参照 */

