/*
 * HubSpot 新フォーム（.hs-form-frame + iframe）向け。
 * 親ページの [data-hs-forms-root] の --hsf-* が埋め込みにより iframe 内に渡る。
 * https://developers.hubspot.com/docs/cms/start-building/features/forms/forms
 */
[data-hs-forms-root] {
  --hsf-global__font-family: "Noto Sans JP", sans-serif;
  --hsf-global__font-size: 0.9375rem;
  --hsf-global__color: #1e293b;
  --hsf-global-error__color: #dc2626;

  --hsf-row__vertical-spacing: 1.25rem;
  --hsf-row__horizontal-spacing: 1rem;
  --hsf-module__vertical-spacing: 1rem;

  --hsf-field-label__font-family: "Noto Sans JP", sans-serif;
  --hsf-field-label__font-size: 0.875rem;
  --hsf-field-label__color: #334155;
  --hsf-field-label-requiredindicator__color: #dc2626;

  --hsf-field-description__font-family: "Noto Sans JP", sans-serif;
  --hsf-field-description__color: #64748b;

  --hsf-field-input__font-family: "Noto Sans JP", sans-serif;
  --hsf-field-input__color: #1e293b;
  --hsf-field-input__background-color: #ffffff;
  --hsf-field-input__border-color: #e2e8f0;
  --hsf-field-input__border-width: 1px;
  --hsf-field-input__border-style: solid;
  --hsf-field-input__border-radius: 0.5rem;
  --hsf-field-input__padding: 0.625rem 0.875rem;
  --hsf-field-input__placeholder-color: #94a3b8;

  --hsf-field-textarea__font-family: "Noto Sans JP", sans-serif;
  --hsf-field-textarea__color: #1e293b;
  --hsf-field-textarea__background-color: #ffffff;
  --hsf-field-textarea__border-color: #e2e8f0;
  --hsf-field-textarea__border-width: 1px;
  --hsf-field-textarea__border-style: solid;
  --hsf-field-textarea__border-radius: 0.5rem;
  --hsf-field-textarea__padding: 0.625rem 0.875rem;
  --hsf-field-textarea__placeholder-color: #94a3b8;

  --hsf-field-checkbox__background-color: #ffffff;
  --hsf-field-checkbox__border-color: #e2e8f0;
  --hsf-field-checkbox__border-width: 1px;
  --hsf-field-checkbox__border-style: solid;
  --hsf-field-checkbox__color: #64748b;
  --hsf-field-checkbox__padding: 0.75rem;

  --hsf-field-radio__background-color: #ffffff;
  --hsf-field-radio__border-color: #e2e8f0;
  --hsf-field-radio__border-width: 1px;
  --hsf-field-radio__border-style: solid;
  --hsf-field-radio__color: #64748b;
  --hsf-field-radio__padding: 0.75rem;

  --hsf-button__font-family: "Noto Sans JP", sans-serif;
  --hsf-button__font-size: 1.125rem;
  --hsf-button__color: #ffffff;
  --hsf-button__background-color: transparent;
  --hsf-button__background-image: linear-gradient(to right, #16a34a, #2563eb);
  --hsf-button__border-radius: 0.75rem;
  --hsf-button__padding: 0.9375rem 1.5rem;
  --hsf-button__box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.2);

  --hsf-background__background-color: transparent;
  --hsf-background__border-width: 0;
  --hsf-background__border-style: none;
  --hsf-background__border-color: transparent;
  --hsf-background__border-radius: 0;
  --hsf-background__padding: 0;

  --hsf-richtext__font-family: "Noto Sans JP", sans-serif;
  --hsf-richtext__font-size: 0.8125rem;
  --hsf-richtext__color: #64748b;

  --hsf-erroralert__font-family: "Noto Sans JP", sans-serif;
  --hsf-erroralert__font-size: 0.8125rem;
  --hsf-erroralert__color: #dc2626;

  --hsf-infoalert__font-family: "Noto Sans JP", sans-serif;
  --hsf-infoalert__font-size: 0.8125rem;
  --hsf-infoalert__color: #64748b;

  --hsf-heading__font-family: "Zen Maru Gothic", sans-serif;
  --hsf-heading__color: #0f172a;

  --hsf-field-footer__font-family: "Noto Sans JP", sans-serif;
  --hsf-field-footer__color: #64748b;
}

/*
 * forms.create({ css: <this file URL> }) はこのスタイルを iframe 内に読み込む。
 * 親ページのセレクタは iframe に届かないため、.hs-form 直下向けのルールを別途定義する。
 */
.hs-form {
  font-family: "Noto Sans JP", sans-serif;
}

.hs-form fieldset {
  max-width: 100% !important;
  margin: 0;
  padding: 0;
  border: none;
}

.hs-form fieldset.form-columns-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .hs-form fieldset.form-columns-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.hs-form fieldset.form-columns-2 .hs-form-field {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}

.hs-form fieldset.form-columns-1 {
  display: block;
}

.hs-form fieldset + fieldset {
  margin-top: 1.25rem;
}

.hs-form .hs-form-field {
  margin-bottom: 0 !important;
}

.hs-form .hs-form-field + .hs-form-field {
  margin-top: 1.25rem;
}

.hs-form fieldset.form-columns-2 .hs-form-field + .hs-form-field {
  margin-top: 0;
}

.hs-form .hs-form-field > label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.5rem;
}

.hs-form .hs-form-field > label .hs-form-required {
  color: #dc2626;
  margin-left: 0.125rem;
}

.hs-form .hs-input,
.hs-form select {
  display: block;
  width: 100% !important;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #1e293b;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.hs-form .hs-input::placeholder {
  color: #94a3b8;
}

.hs-form .hs-input:focus,
.hs-form select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.hs-form textarea.hs-input {
  min-height: 120px;
  resize: vertical;
}

.hs-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.hs-form .hs-error-msgs {
  list-style: none;
  padding: 0;
  margin: 0.375rem 0 0;
}

.hs-form .hs-error-msgs li label {
  font-size: 0.8125rem;
  color: #dc2626;
  font-weight: 400;
}

.hs-form .hs-richtext {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.hs-form .hs-richtext p {
  margin: 0;
}

.hs-form .hs_submit {
  margin-top: 1.5rem;
}

.hs-form .hs-button.primary,
.hs-form input[type="submit"].hs-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.9375rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: "Noto Sans JP", sans-serif;
  color: #fff !important;
  background: linear-gradient(to right, #16a34a, #2563eb) !important;
  border: none !important;
  border-radius: 0.75rem;
  cursor: pointer;
  box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.2);
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.hs-form .hs-button.primary:hover,
.hs-form input[type="submit"].hs-button:hover {
  box-shadow: 0 8px 20px -3px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.hs-form .hs-button.primary:active,
.hs-form input[type="submit"].hs-button:active {
  transform: translateY(0);
}

.hs-form .submitted-message {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 1.0625rem;
  color: #16a34a;
  font-weight: 500;
  line-height: 1.6;
}

.hs-form .hs-form-field .input {
  margin: 0 !important;
}

.hs-form .hs-form-booleancheckbox-display {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.hs-form .hs-form-booleancheckbox-display input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  accent-color: #2563eb;
  flex-shrink: 0;
}

.hs-form .hs-form-booleancheckbox-display span {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
}

.hs-form .legal-consent-container .hs-richtext {
  margin-bottom: 0.75rem;
}

.hs-form .hs-fieldtype-booleancheckbox .inputs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hs-form .hs-form-field ul.inputs-list li {
  list-style: none;
}
