/**
 * [ARTNET Captcha]
 * - 역할: kcaptcha(#captcha) 전역 디자인. 전시 작성 스타일을 모든 자동등록방지에 적용
 * - 작성/수정일: 2026-08-15
 */

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border-color, #eee);
  border-radius: 12px;
  background: var(--white-color, #fff);
  box-sizing: border-box;
}

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) legend {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  font-size: 0;
  line-height: 0;
  text-indent: -9999em;
}

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_info {
  display: none;
}

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_img {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--border-color, #eee);
  border-radius: var(--radius-sm, 5px);
  background: var(--section-bg-color, #f9f9f9);
  vertical-align: top;
}

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_key {
  width: 148px;
  height: 50px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--border-color, #eee);
  border-radius: var(--radius-sm, 5px);
  background: var(--white-color, #fff);
  color: var(--title-color, #171717);
  font-size: var(--fs-label, 14px);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-align: center;
  vertical-align: top;
}

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_key:focus {
  border-color: var(--primary-color, #171717);
  outline: none;
}

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_mp3,
#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_reload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 50px;
  margin: 0;
  padding: 0 14px;
  overflow: visible;
  border: 1px solid var(--border-color, #eee);
  border-radius: var(--radius-sm, 5px);
  background: var(--white-color, #fff);
  background-image: none;
  color: var(--title-color, #171717);
  font-size: var(--fs-caption, 13px);
  font-weight: 600;
  line-height: 1;
  text-indent: 0;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: middle;
}

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_mp3:hover,
#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_reload:hover {
  border-color: var(--title-color, #171717);
}

#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_mp3 span,
#captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_reload span {
  display: none;
}

#captcha.captcha.m_captcha:not(.recaptcha):not(.invisible_recaptcha) audio {
  width: 100%;
  margin: 0 0 8px;
}

#captcha.captcha.m_captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_img {
  width: auto;
  height: 56px;
  margin: 0;
}

/* [다크모드] kcaptcha
 * - 역할: 흰 배경 PNG를 반전해 다크 면에 맞춤 (코어 이미지 생성은 그대로)
 * - 작성/수정일: 2026-08-15
 */
html.dark #captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_img,
body.dark #captcha.captcha:not(.recaptcha):not(.invisible_recaptcha) #captcha_img {
  filter: invert(1);
  background: transparent;
  border-color: var(--border-color);
}
