.form {
  max-width: 800px;
  margin: 0 auto;
}

.form-note {
  text-align: center;
  color: var(--Grey-600);
  font-size: 14px;
  line-height: 1.6;
}

.input-container {
  margin-bottom: 20px;
}

.input-container-half {
  width: 47%;
}

.required {
  color: var(--Red-600);
}

.input-label {
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 8px;
  display: block;
}

.input-note {
  font-weight: 500;
  font-size: 12px;
  color: var(--Grey-420);
  margin-top: 5px;
}

.input-box {
  width: 100%;
  height: 48px;
  background-color: white;
  border: 1px solid var(--Grey-100);
  border-radius: 4px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.input-box-height-100 {
  height: 100px;
}

.input-box input,
.input-box select {
  width: 100%;
  height: 100%;
  border: none;
  outline: 0;
  font-weight: 500;
  font-size: 16px;
  color: var(--Neutral-Black);
  padding: 0 10px;
  background: transparent;
}

.input-box input::placeholder,
.input-box select::placeholder {
  color: var(--Grey-400);
}

.show-password,
.drop-down {
  position: absolute;
  top: 50%;
  right: 10px;
  z-index: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.input-date {
  width: 140px;
  margin-right: 10px;
  overflow: visible;
}

.date-drop-down {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  background: white;
  z-index: 9999;
  display: none;
  max-height: 300px;
  overflow-y: scroll;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.date-drop-down-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--Grey-100);
  color: var(--Neutral-Black);
  cursor: pointer;
}

.date-drop-down-item:hover {
  background-color: var(--Grey-50);
}

.input-radio {
  height: auto !important;
  padding: 12px !important;
}

.radio-container {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.radio-container:last-child {
  margin-bottom: 0;
}

.radio-container input[type='radio'] {
  display: none;
}

.custom-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--Neutral-Black);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  cursor: pointer;
}

.custom-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background-color: var(--Neutral-Black);
  border-radius: 50%;
  display: none;
}

input[type='radio']:checked + .custom-radio::after {
  display: block;
}

.radio-label {
  font-size: 14px;
  color: var(--Neutral-Black);
}

.checkbox {
  display: none;
}

.checkbox-label {
  width: 24px;
  height: 24px;
  border: 2px solid var(--Neutral-Black);
  display: inline-block;
  position: relative;
  cursor: pointer;
  background-color: transparent;
  margin-right: 10px;
  flex-shrink: 0;
}

.checkbox:checked + .checkbox-label::before {
  content: '';
  position: absolute;
  background: url('../images/white-check.svg');
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-repeat: no-repeat;
  top: 0;
  left: 0;
  background-size: 70%;
  background-position: center center;
}

.terms-and-condition {
  text-decoration: underline;
  color: var(--Neutral-Black);
  font-size: 14px;
  line-height: 1.4;
}

@media (max-width: 576px) {
  .input-container-half {
    width: 100%;
  }

  .input-date {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }
}

.form-warning-note {
  color: #b04949;
  font-weight: 500;
  font-size: 12px;
}

.radio-container.disabled .custom-radio {
  border: 2px solid #b3b3b3;
}

.form-control-static {
  display: block;
  padding: 0.375;
}

/* チェックボックス風のマルチセレクト */
.checkbox-style-select {
  height: 100%;
  overflow-y: auto;
}

.checkbox-style-select option {
  padding: 8px 10px;
  margin-bottom: 2px;
  position: relative;
  font-size: 14px;
  display: block;
  cursor: pointer;
}

.checkbox-style-select option:hover {
  background-color: var(--Grey-50);
}

.checkbox-style-select option:checked {
  background-color: var(--Grey-100);
  font-weight: 500;
}

.checkbox-style-select option:before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 1px solid var(--Grey-400);
  vertical-align: middle;
}

.checkbox-style-select option:checked:before {
  background-color: var(--Neutral-Black);
  border-color: var(--Neutral-Black);
}

/* 選択用のヘルプテキスト */
.select-help-text {
  font-size: 12px;
  color: var(--Grey-500);
  margin-top: 5px;
  display: block;
}

/* チェックボックスリスト */
.input-box-height-auto {
  height: auto;
  min-height: 48px;
  padding: 10px;
}

.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-height: 300px;
  overflow-y: auto;
}

.checkbox-item {
  width: 100%;
  padding: 8px 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--Grey-100);
}

.checkbox-item:last-child {
  border-bottom: none;
}

.checkbox-item input[type='checkbox'] {
  width: auto;
  height: auto;
  margin-right: 10px;
}

.checkbox-item label {
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 0;
}

.dealer-checkbox {
  display: none;
}

.checkbox-item label {
  position: relative;
  padding-left: 30px;
  cursor: pointer;
}

.checkbox-item label:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border: 1px solid var(--Grey-300);
  background-color: white;
  border-radius: 2px;
}

.dealer-checkbox:checked + label:before {
  background-color: white;
  border-color: var(--Neutral-Black);
}

.dealer-checkbox:checked + label:after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 8px;
  height: 13px;
  border: solid var(--Neutral-Black);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 代理店チェックボックスのカードスタイル */
.dealer-checkbox-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin-bottom: 20px;
}

.checkbox-item-card {
  width: 100%;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 15px;
  position: relative;
}

@media (min-width: 576px) {
  .checkbox-item-card {
    width: calc(50% - 5px);
  }
}

@media (min-width: 768px) {
  .checkbox-item-card {
    width: calc(33.333% - 7px);
  }
}

.checkbox-item-card label {
  display: block;
  width: 100%;
  padding-left: 30px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkbox-item-card input[type='checkbox'] {
  position: absolute;
  opacity: 0;
}

.checkbox-item-card label:before {
  content: '';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 1px solid #ccc;
  background-color: white;
  border-radius: 2px;
}

.dealer-checkbox:checked + label:before {
  background-color: white;
  border-color: var(--Neutral-Black);
}

.dealer-checkbox:checked + label:after {
  content: '';
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-70%) rotate(45deg);
  width: 6px;
  height: 12px;
  border: solid var(--Neutral-Black);
  border-width: 0 2px 2px 0;
}
