h3.title {
  color: #87212b;
  font-weight: bold;
}

hr {
  margin: 40px 0;
}

.btn-primary {
  width: 100%;
  margin-top: 10px;
}

label:not(.custom-checkbox):not(.custom-section-checkbox):not(
    .custom-type-checkbox
  ) {
  font-size: 1.1rem;
  color: #284b63;
  font-weight: bold;
  display: block;
}

.form-control {
  margin-bottom: 10px;
}

textarea {
  height: 150px;
  resize: none;
}

.btnWrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 5px;
}

.btnWrap .btn {
  margin: 0;
  width: 50%;
  font-size: 1rem;
}

/* loading spinner */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0005;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  display: none;
}

.loading-spinner {
  border: 4px solid #f5f2e9aa;
  border-left: 4px solid #284b63;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.input-group {
  gap: 5px;
  width: 50%;
  align-items: center;
}

.input-group button {
  margin-bottom: 10px;
}

.input-group
  > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(
    .valid-feedback
  ):not(.invalid-tooltip):not(.invalid-feedback) {
  border-radius: 10px;
}

@media (max-width: 768px) {
  .input-group {
    width: 100%;
  }
}

.form-control:disabled,
.form-select:disabled {
  background-color: #e6e6e6;
  opacity: 0.7;
}

.urlInput {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 10px;
  font-weight: bold;
  color: #284b63;
}

.toggle-text {
  text-align: center;
}

.toggle-switch {
  position: relative;
  width: 60px;
  height: 28px;
}

#UrlToggle .toggle-switch {
  margin: 10px 0;
}

.toggle-input {
  display: none;
}

.toggle-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #b7b7b7;
  border-radius: 34px;
  transition: background-color 0.3s;
}

.toggle-label::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: white;
  top: 4px;
  left: 3px;
  transition: left 0.3s;
}

.toggle-input:checked + .toggle-label::after {
  left: calc(100% - 24px);
}

.toggle-input:checked + .toggle-label {
  background-color: #ae3844;
}

/* 複選 */
.custom-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  position: relative;
}

.custom-checkbox,
.custom-type-checkbox,
.custom-section-checkbox {
  display: block;
}

.custom-checkbox input,
.custom-type-checkbox input,
.custom-section-checkbox input {
  display: none;
}

.custom-checkbox i.fa-check,
.custom-checkbox i.fa-minus {
  display: none;
}

.custom-checkbox i {
  font-size: 0.8rem;
}

.custom-checkbox.open i.fa-plus {
  display: none;
}

.custom-checkbox.open i.fa-minus {
  display: inline-block;
}

.custom-checkbox .checkmark,
.custom-type-checkbox .checkmark {
  display: inline-block;
  color: #284b63;
  border: 1px solid #284b63;
  background-color: transparent;
  vertical-align: middle;
  padding: 5px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s all linear;
}

.custom-section-checkbox .checkmark {
  display: inline-block;
  color: #f5f2e9;
  border: 1px solid #f5f2e9;
  background-color: #284b63;
  vertical-align: middle;
  padding: 5px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.2s all linear;
}

.custom-checkbox.open .checkmark {
  background-color: #284b63;
  color: #f5f2e9;
}

.custom-checkbox > input:checked + .checkmark,
.custom-type-checkbox > input:checked + .checkmark {
  background-color: #87212b;
  border-color: #87212b;
  color: #f5f2e9;
}

.custom-checkbox.open > input:checked + .checkmark {
  background-color: #284b63;
  border-color: #284b63;
  color: #f5f2e9;
}

.custom-checkbox > input:checked + .checkmark i.fa-check,
.custom-type-checkbox > input:checked + .checkmark i.fa-check {
  display: inline-block;
}

.custom-section-checkbox:hover .checkmark,
.custom-section-checkbox input:checked + .checkmark {
  background-color: #f5f2e9;
  color: #000203;
}

.custom-section-checkbox input + .checkmark > i {
  display: none;
}

.custom-section-checkbox input:checked + .checkmark > i {
  display: inline-block;
}

.custom-checkbox input:checked + .checkmark:after,
.custom-type-checkbox input:checked + .checkmark:after,
.custom-section-checkbox input:checked + .checkmark:after {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.sectionOptionsWrap {
  position: absolute;
  background: #284b63;
  z-index: 999;
  border-radius: 10px;
  width: 100%;
  left: 0;
  margin-top: 3px;
}

.sectionOptions {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  gap: 10px;
}

.custom-section-checkbox.disabled,
.custom-type-checkbox.disabled {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.6;
}
