/* ===== HAIR WIZARD - 다단계 상담 모달 스타일 ===== */
/* 아트데코 테마 헤어 살롱 위저드 전용 스타일시트 */

/* ===== 1. 모달 컨테이너 ===== */
.wizard-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.wizard-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: wizardFadeIn 0.35s ease forwards;
}

/* ===== 2. 모달 콘텐츠 ===== */
/* wizard.js 인라인 CSS가 .wizard-modal을 통해 모달 스타일링 처리 */
/* .wizard-content는 내부 콘텐츠 래퍼이므로 모달 스타일 제거 */
.wizard-content {
  position: relative;
  width: 100%;
}

/* ===== 3. 헤더 ===== */
.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0;
  position: relative;
}

.wizard-header-title {
  flex: 1;
  text-align: center;
  font-family: var(--heading-font, 'Poiret One', cursive);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--stone-700, #44403c);
  font-weight: var(--font-weight-heading, 400);
}

/* ===== 4. 프로그레스 바 ===== */
.wizard-progress {
  height: 3px;
  background: rgba(212, 175, 55, 0.15);
  margin: 1rem 1.5rem;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold, #D4AF37), var(--gold-light, #e8c9a8));
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

/* 프로그레스 바 빛 효과 */
.wizard-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6));
  border-radius: 2px;
}

/* ===== 5. 바디 ===== */
.wizard-body {
  padding: 1rem 1.5rem 1.5rem;
  overflow: hidden;
  position: relative;
}

/* 슬라이드 컨테이너 */
.wizard-slide {
  animation: wizardSlideLeft 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 앞으로 이동 시 오른쪽에서 진입 */
.wizard-slide.slide-forward {
  animation: wizardSlideLeft 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 뒤로 이동 시 왼쪽에서 진입 */
.wizard-slide.slide-back {
  animation: wizardSlideRight 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ===== 6. 상태 제목 ===== */
.wizard-state-title {
  font-family: var(--heading-font, 'Poiret One', cursive);
  font-size: 1.3rem;
  font-weight: var(--font-weight-heading, 400);
  color: var(--stone-800, #292524);
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: 0.08em;
}

/* ===== 7. 상태 부제목 ===== */
.wizard-state-subtitle {
  color: var(--stone-500, #78716c);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ===== 8. 옵션 그리드 ===== */
.wizard-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ===== 9. 옵션 카드 ===== */
.wizard-option {
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  background: var(--white, #ffffff);
  transition: all 0.2s ease;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.wizard-option:hover {
  border-color: var(--gold, #D4AF37);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.15);
}

.wizard-option:active {
  transform: scale(0.98);
}

.wizard-option.selected {
  border-color: var(--gold, #D4AF37);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.wizard-option-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
  line-height: 1;
}

.wizard-option-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--stone-700, #44403c);
  display: block;
  line-height: 1.4;
}

.wizard-option-desc {
  font-size: 0.8rem;
  color: var(--stone-500, #78716c);
  margin-top: 0.25rem;
  display: block;
  line-height: 1.4;
}

/* ===== 10. 메시지 상태 ===== */
.wizard-message {
  text-align: center;
  padding: 1rem 0;
}

.wizard-message-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
  line-height: 1;
}

.wizard-message-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--stone-600, #57534e);
}

.wizard-message-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ===== 11. 버튼 ===== */
.wizard-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--gold, #D4AF37) 0%, var(--gold-dark, #b8956a) 100%);
  color: var(--white, #ffffff);
  border: none;
  border-radius: 8px;
  font-family: var(--body-font, 'Josefin Sans', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.wizard-btn-primary:hover {
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
  filter: brightness(1.05);
}

.wizard-btn-primary:active {
  filter: brightness(0.95);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.wizard-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--gold, #D4AF37);
  border: 1px solid var(--gold, #D4AF37);
  border-radius: 8px;
  font-family: var(--body-font, 'Josefin Sans', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.wizard-btn-secondary:hover {
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.15);
}

.wizard-btn-secondary:active {
  background: rgba(212, 175, 55, 0.12);
}

/* ===== 12. 폼 ===== */
.wizard-form {
  text-align: left;
}

.wizard-form-group {
  margin-bottom: 1rem;
}

.wizard-form-group label {
  font-size: 0.85rem;
  color: var(--stone-600, #57534e);
  margin-bottom: 0.3rem;
  display: block;
  letter-spacing: 0.03em;
}

.wizard-form-group input,
.wizard-form-group textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  font-family: var(--body-font, 'Josefin Sans', sans-serif);
  font-size: 0.9rem;
  color: var(--stone-700, #44403c);
  background: rgba(250, 249, 246, 0.5);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.wizard-form-group input:focus,
.wizard-form-group textarea:focus {
  outline: none;
  border-color: var(--gold, #D4AF37);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.wizard-form-group input::placeholder,
.wizard-form-group textarea::placeholder {
  color: var(--stone-400, #a8a29e);
}

.wizard-form-group textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.6;
}

/* ===== 13. 사진 업로드 ===== */
.wizard-photo-upload {
  border: 2px dashed rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.wizard-photo-upload:hover {
  border-color: var(--gold, #D4AF37);
  background: rgba(212, 175, 55, 0.03);
}

.wizard-photo-upload:active {
  background: rgba(212, 175, 55, 0.06);
}

.wizard-photo-icon {
  font-size: 2rem;
  color: var(--gold, #D4AF37);
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.wizard-photo-text {
  font-size: 0.85rem;
  color: var(--stone-500, #78716c);
  line-height: 1.5;
}

/* ===== 14. 사진 미리보기 ===== */
.wizard-photo-previews {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.wizard-photo-thumb {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.wizard-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wizard-photo-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white, #ffffff);
  border: none;
  border-radius: 50%;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  padding: 0;
}

.wizard-photo-remove:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* ===== 15. 푸터 면책조항 ===== */
.wizard-disclaimer {
  font-size: 0.75rem;
  color: var(--stone-400, #a8a29e);
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  margin-top: 1rem;
  line-height: 1.5;
}

/* ===== 16. 애니메이션 ===== */
@keyframes wizardFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wizardSlideUp {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes wizardSlideLeft {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes wizardSlideRight {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== 17. 뒤로가기 / 닫기 버튼 ===== */
.wizard-back {
  background: none;
  border: none;
  color: var(--stone-500, #78716c);
  font-family: var(--body-font, 'Josefin Sans', sans-serif);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem;
  transition: color 0.2s ease;
  min-width: 44px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.wizard-back:hover {
  color: var(--stone-700, #44403c);
}

/* 뒤로가기 버튼이 없을 때 공간 유지 */
.wizard-back.hidden {
  visibility: hidden;
  pointer-events: none;
}

.wizard-close {
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  color: var(--stone-500, #78716c);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  line-height: 1;
}

.wizard-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--stone-700, #44403c);
}

.wizard-close:active {
  background: rgba(0, 0, 0, 0.08);
}

/* ===== 18. 모바일 반응형 ===== */
@media (max-width: 640px) {
  .wizard-content {
    max-width: 100%;
    margin: 0.5rem;
    max-height: 95vh;
    border-radius: 12px;
  }

  .wizard-header {
    padding: 1.25rem 1.25rem 0;
  }

  .wizard-progress {
    margin: 0.75rem 1.25rem;
  }

  .wizard-body {
    padding: 0.75rem 1.25rem 1.25rem;
  }

  .wizard-state-title {
    font-size: 1.15rem;
  }
}

@media (max-width: 480px) {
  /* 1열 그리드로 변경 */
  .wizard-options {
    grid-template-columns: 1fr;
  }

  .wizard-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .wizard-content {
    margin: 0;
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }

  .wizard-header-title {
    font-size: 1rem;
  }
}

/* 터치 친화적: 모든 인터랙티브 요소 최소 44px */
@media (pointer: coarse) {
  .wizard-option {
    min-height: 44px;
    padding: 1rem;
  }

  .wizard-btn-primary,
  .wizard-btn-secondary {
    min-height: 44px;
    padding: 0.85rem 1.5rem;
  }

  .wizard-back,
  .wizard-close {
    min-width: 44px;
    min-height: 44px;
  }
}

/* ===== 19. 스크롤바 스타일링 ===== */
.wizard-content::-webkit-scrollbar {
  width: 4px;
}

.wizard-content::-webkit-scrollbar-track {
  background: transparent;
}

.wizard-content::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 2px;
}

.wizard-content::-webkit-scrollbar-thumb:hover {
  background: var(--gold, #D4AF37);
}

/* Firefox 스크롤바 */
.wizard-content {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

/* ===== 접근성: 모션 감소 모드 ===== */
@media (prefers-reduced-motion: reduce) {
  .wizard-modal-overlay,
  .wizard-content,
  .wizard-slide,
  .wizard-option,
  .wizard-btn-primary,
  .wizard-btn-secondary,
  .wizard-progress-bar {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .wizard-modal-overlay.active .wizard-content {
    transform: none;
    opacity: 1;
  }
}

/* ===== 키보드 포커스 링 ===== */
.wizard-option:focus-visible,
.wizard-btn-primary:focus-visible,
.wizard-btn-secondary:focus-visible,
.wizard-back:focus-visible,
.wizard-close:focus-visible,
.wizard-photo-upload:focus-visible {
  outline: 2px solid var(--gold, #D4AF37);
  outline-offset: 2px;
}

.wizard-form-group input:focus-visible,
.wizard-form-group textarea:focus-visible {
  outline: 2px solid var(--gold, #D4AF37);
  outline-offset: 1px;
}
