/* Trendy checkbox / radio — site frontend (admin 제외) */

:root {
  --nh-choice-size: 1.25rem;
  --nh-choice-radius: 0.375rem;
  --nh-choice-border: 1.5px;
  --nh-choice-checked-bg: #6e8db8;
  --nh-choice-checked-mark: var(--nh-yellow);
  --nh-choice-checked-shadow: 0 0 0 1px rgba(110, 141, 184, 0.28), 0 4px 12px rgba(110, 141, 184, 0.26);
}

/* ── Custom-checkbox (동행신청·마이페이지 수정) ── */
.custom-checkbox {
  --nh-choice-mark: var(--nh-choice-size);
  position: relative;
  display: inline-grid;
  grid-template-columns: var(--nh-choice-mark) max-content;
  align-items: center;
  column-gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  color: var(--nh-navy);
  font-weight: 600;
  line-height: 1.3;
}

.custom-checkbox input.hidden,
.custom-checkbox input[type="checkbox"],
.custom-checkbox input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox .unchecked,
.custom-checkbox .checked,
.custom-checkbox .fa-square,
.custom-checkbox .fa-check-square,
.custom-checkbox .fa-circle,
.custom-checkbox .fa-dot-circle {
  display: none !important;
}

.custom-checkbox::before,
.custom-checkbox::after {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  box-sizing: border-box;
  pointer-events: none;
}

.custom-checkbox::before {
  content: "";
  width: var(--nh-choice-mark);
  height: var(--nh-choice-mark);
  border: var(--nh-choice-border) solid var(--nh-navy);
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 45, 74, 0.06);
  transition:
    background 0.18s var(--nh-ease),
    border-color 0.18s var(--nh-ease),
    box-shadow 0.18s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

.custom-checkbox:has(input[type="checkbox"])::before {
  border-radius: var(--nh-choice-radius);
}

.custom-checkbox:has(input[type="radio"])::before {
  border-radius: 50%;
}

.custom-checkbox:hover::before {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26, 45, 74, 0.1);
}

.custom-checkbox:has(input:checked)::before {
  background: var(--nh-choice-checked-bg);
  border-color: var(--nh-choice-checked-bg);
  box-shadow: var(--nh-choice-checked-shadow);
}

.custom-checkbox:has(input[type="checkbox"])::after {
  content: "";
  box-sizing: content-box;
  width: 0.28rem;
  height: 0.45rem;
  margin-top: -0.1em;
  border: solid var(--nh-choice-checked-mark);
  border-width: 0 0 5.25px 5.25px;
  opacity: 0;
  transform: rotate(-45deg) scale(0.4);
  transition:
    opacity 0.16s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

.custom-checkbox:has(input[type="checkbox"]:checked)::after {
  opacity: 1;
  transform: rotate(-45deg) scale(1);
}

.custom-checkbox:has(input[type="radio"])::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 50%;
  background: var(--nh-choice-checked-mark);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.16s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

.custom-checkbox:has(input[type="radio"]:checked)::after {
  opacity: 1;
  transform: scale(1);
}

.custom-checkbox:has(input:focus-visible)::before {
  box-shadow: 0 0 0 3px var(--nh-yellow-muted), 0 0 0 1.5px var(--nh-navy);
}

.custom-checkbox:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

td .custom-checkbox {
  --nh-choice-mark: 1.375rem;
  grid-template-columns: var(--nh-choice-mark);
  justify-content: center;
  width: 100%;
  min-height: 2.25rem;
}

/* ── member-auth-choice (로그인·가입·약관) ── */
.member-auth-choice-mark,
.member-mypage-choice-mark,
.member-owner-store-choice-mark {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  box-sizing: border-box;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 45, 74, 0.06);
  transition:
    background 0.18s var(--nh-ease),
    border-color 0.18s var(--nh-ease),
    box-shadow 0.18s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

.member-auth-choice-input[type="checkbox"] + .member-auth-choice-mark,
.member-mypage-choice-input[type="checkbox"] + .member-mypage-choice-mark {
  border-radius: var(--nh-choice-radius) !important;
}

.member-auth-choice-input[type="radio"] + .member-auth-choice-mark,
.member-mypage-choice-input[type="radio"] + .member-mypage-choice-mark {
  border-radius: 50% !important;
}

.member-auth-choice:hover .member-auth-choice-mark {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26, 45, 74, 0.1);
}

.member-auth-choice-input:checked + .member-auth-choice-mark,
.member-mypage-choice-input:checked + .member-mypage-choice-mark {
  background: var(--nh-choice-checked-bg) !important;
  border-color: var(--nh-choice-checked-bg) !important;
  box-shadow: var(--nh-choice-checked-shadow);
}

.member-auth-choice-input[type="checkbox"] + .member-auth-choice-mark::after,
.member-mypage-choice-input[type="checkbox"] + .member-mypage-choice-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 38%;
  height: 58%;
  border: solid var(--nh-choice-checked-mark);
  border-width: 0 0 5.25px 5.25px !important;
  border-color: var(--nh-choice-checked-mark) !important;
  inset: auto !important;
  opacity: 0;
  transform: translate(-50%, -60%) rotate(-45deg) scale(0.4);
  transition:
    opacity 0.16s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

.member-auth-choice-input[type="checkbox"]:checked + .member-auth-choice-mark::after,
.member-mypage-choice-input[type="checkbox"]:checked + .member-mypage-choice-mark::after {
  opacity: 1;
  transform: translate(-50%, -60%) rotate(-45deg) scale(1);
}

.member-auth-choice-input[type="radio"] + .member-auth-choice-mark::after,
.member-mypage-choice-input[type="radio"] + .member-mypage-choice-mark::after {
  content: "";
  position: absolute;
  inset: 20% !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 50%;
  background: var(--nh-choice-checked-mark);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.16s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

.member-auth-choice-input[type="radio"]:checked + .member-auth-choice-mark::after,
.member-mypage-choice-input[type="radio"]:checked + .member-mypage-choice-mark::after {
  opacity: 1;
  transform: scale(1);
}

.member-auth-choice-input:focus-visible + .member-auth-choice-mark {
  box-shadow: 0 0 0 3px var(--nh-yellow-muted), 0 0 0 1.5px var(--nh-navy);
}

.nh-auth-page .member-auth-choice-input[type="radio"]:checked + .member-auth-choice-mark::after {
  border: 0 !important;
  inset: 20% !important;
}

/* ── 후원·문의·QnA 인디케이터 ── */
.donation-form-choice-indicator,
.join-application-form-choice-indicator {
  position: relative;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(26, 45, 74, 0.06);
  transition:
    background 0.18s var(--nh-ease),
    border-color 0.18s var(--nh-ease),
    box-shadow 0.18s var(--nh-ease),
    transform 0.18s var(--nh-ease),
    border-radius 0.18s var(--nh-ease);
}

.peer[type="checkbox"] + .donation-form-choice-indicator,
.peer[type="checkbox"] + .join-application-form-choice-indicator {
  border-radius: var(--nh-choice-radius) !important;
}

.peer[type="radio"] + .donation-form-choice-indicator,
.peer[type="radio"] + .join-application-form-choice-indicator {
  border-radius: 50% !important;
}

label:hover > .donation-form-choice-indicator,
label:hover > .join-application-form-choice-indicator {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(26, 45, 74, 0.1);
}

.peer:checked + .donation-form-choice-indicator,
.peer:checked + .join-application-form-choice-indicator {
  background: var(--nh-choice-checked-bg) !important;
  border-color: var(--nh-choice-checked-bg) !important;
  box-shadow: var(--nh-choice-checked-shadow);
}

.peer[type="checkbox"] + .donation-form-choice-indicator::after,
.peer[type="checkbox"] + .join-application-form-choice-indicator::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 38%;
  height: 62%;
  border: solid var(--nh-choice-checked-mark);
  border-width: 0 0 6px 6px;
  opacity: 0;
  transform: translate(-50%, -60%) rotate(-45deg) scale(0.4);
  transition:
    opacity 0.16s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

.peer[type="checkbox"]:checked + .donation-form-choice-indicator::after,
.peer[type="checkbox"]:checked + .join-application-form-choice-indicator::after {
  opacity: 1;
  transform: translate(-50%, -60%) rotate(-45deg) scale(1);
}

.peer[type="radio"] + .donation-form-choice-indicator::after,
.peer[type="radio"] + .join-application-form-choice-indicator::after {
  content: "";
  position: absolute;
  inset: 20%;
  border: 0;
  border-radius: 50%;
  background: var(--nh-choice-checked-mark);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.16s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

.peer[type="radio"]:checked + .donation-form-choice-indicator::after,
.peer[type="radio"]:checked + .join-application-form-choice-indicator::after {
  opacity: 1;
  transform: scale(1);
}

.peer:focus-visible + .donation-form-choice-indicator,
.peer:focus-visible + .join-application-form-choice-indicator {
  box-shadow: 0 0 0 3px var(--nh-yellow-muted), 0 0 0 1.5px var(--nh-navy);
}

.peer:disabled + .donation-form-choice-indicator {
  opacity: 0.45;
}

.client-static-dialog--qna-regist .peer[type="checkbox"] + .donation-form-choice-indicator {
  border-radius: var(--nh-choice-radius) !important;
}

.client-static-dialog--qna-regist .peer[type="radio"] + .donation-form-choice-indicator {
  border-radius: 50% !important;
}

/* ── Native Tailwind / 브라우저 기본 ── */
input.form-checkbox,
input.form-radio,
.nh-legacy input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer):not(.member-auth-choice-input),
.nh-form-page input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer):not(.member-auth-choice-input),
.nh-legacy input[type="radio"]:not(.hidden):not(.sr-only):not(.peer):not(.member-auth-choice-input),
.nh-form-page input[type="radio"]:not(.hidden):not(.sr-only):not(.peer):not(.member-auth-choice-input) {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: var(--nh-choice-size);
  height: var(--nh-choice-size);
  margin: 0;
  padding: 0;
  vertical-align: middle;
  cursor: pointer;
  background: #fff;
  border: var(--nh-choice-border) solid var(--nh-navy);
  box-shadow: 0 1px 2px rgba(26, 45, 74, 0.06);
  transition:
    background 0.18s var(--nh-ease),
    box-shadow 0.18s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

input.form-checkbox,
.nh-legacy input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer):not(.member-auth-choice-input),
.nh-form-page input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer):not(.member-auth-choice-input) {
  border-radius: var(--nh-choice-radius);
}

input.form-radio,
.nh-legacy input[type="radio"]:not(.hidden):not(.sr-only):not(.peer):not(.member-auth-choice-input),
.nh-form-page input[type="radio"]:not(.hidden):not(.sr-only):not(.peer):not(.member-auth-choice-input) {
  border-radius: 50%;
}

input.form-checkbox:hover,
input.form-radio:hover {
  transform: translateY(-1px);
}

input.form-checkbox:checked,
input.form-radio:checked,
.nh-legacy input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer):checked,
.nh-form-page input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer):checked,
.nh-legacy input[type="radio"]:not(.hidden):not(.sr-only):not(.peer):checked,
.nh-form-page input[type="radio"]:not(.hidden):not(.sr-only):not(.peer):checked {
  background: var(--nh-choice-checked-bg);
  border-color: var(--nh-choice-checked-bg);
  box-shadow: var(--nh-choice-checked-shadow);
}

input.form-checkbox::after,
.nh-legacy input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer)::after,
.nh-form-page input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 42%;
  height: 62%;
  border: solid var(--nh-choice-checked-mark);
  border-width: 0 0 5.25px 5.25px;
  opacity: 0;
  transform: translate(-50%, -60%) rotate(-45deg) scale(0.4);
  transition:
    opacity 0.16s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

input.form-checkbox:checked::after,
.nh-legacy input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer):checked::after,
.nh-form-page input[type="checkbox"]:not(.hidden):not(.sr-only):not(.peer):checked::after {
  opacity: 1;
  transform: translate(-50%, -60%) rotate(-45deg) scale(1);
}

input.form-radio::after,
.nh-legacy input[type="radio"]:not(.hidden):not(.sr-only):not(.peer)::after,
.nh-form-page input[type="radio"]:not(.hidden):not(.sr-only):not(.peer)::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: var(--nh-choice-checked-mark);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.16s var(--nh-ease),
    transform 0.18s var(--nh-ease);
}

input.form-radio:checked::after,
.nh-legacy input[type="radio"]:not(.hidden):not(.sr-only):not(.peer):checked::after,
.nh-form-page input[type="radio"]:not(.hidden):not(.sr-only):not(.peer):checked::after {
  opacity: 1;
  transform: scale(1);
}

input.form-checkbox:focus-visible,
input.form-radio:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--nh-yellow-muted), 0 0 0 1.5px var(--nh-navy);
}

input.form-checkbox + label,
input.form-radio + label {
  cursor: pointer;
}

/* ── 결제수단 카드: 옵션당 하나의 박스, 선택은 파란 테두리+체크 ── */
#pay-method-list {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem !important;
}

@media (max-width: 29.99rem) {
  #pay-method-list {
    grid-template-columns: 1fr !important;
  }
}

#pay-method-list .pay-method-option.hidden {
  display: none !important;
}

#pay-method-list .pay-method-option {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  box-sizing: border-box;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}

#pay-method-list .pay-method-option > input[type="radio"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  appearance: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#pay-method-list .pay-method-option .checkmark {
  display: none !important;
}

#pay-method-list .pay-method-option__face {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  width: 100%;
  min-height: 4rem !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0.5rem 1rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.5rem !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #1f2937;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.2;
  text-align: center;
}

#pay-method-list .pay-method-option:hover .pay-method-option__face {
  background: #eff6ff !important;
}

#pay-method-list .pay-method-option:has(input:checked) .pay-method-option__face,
#pay-method-list .pay-method-option.selected .pay-method-option__face {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 1.5px #2563eb !important;
  color: #2563eb;
  font-weight: 700 !important;
}

#pay-method-list .pay-method-option:has(input:checked) .pay-method-option__text,
#pay-method-list .pay-method-option.selected .pay-method-option__text {
  color: #2563eb;
  font-weight: 700 !important;
}

#pay-method-list .pay-method-option:has(input:checked) .pay-method-option__face::before,
#pay-method-list .pay-method-option.selected .pay-method-option__face::before {
  content: "" !important;
  position: absolute;
  left: 0.45rem;
  top: 0.45rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background-color: #2563eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M2.6 6.2 4.8 8.4 9.4 3.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0.75rem;
  pointer-events: none;
}

#pay-method-list .pay-method-option .peer:checked + span::after,
#pay-method-list .pay-method-option:not(:has(.peer)):has(> input[type="radio"]:checked)::after,
#pay-method-list .pay-method-option .peer:checked + .pay-method-option__face::after {
  content: none !important;
  display: none !important;
}

#pay-method-list .pay-method-option:not(:has(.peer)):has(> input[type="radio"]:checked) {
  border: 0 !important;
  background: transparent !important;
}
