/* 기본 폰트 설정 */
* {
  font-family: "Noto Sans KR", "Nanum Gothic", sans-serif;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}
img, video {
  max-width: 100%;
  height: auto;
}

.card-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  container-type: inline-size;
  container-name: card;
  font-family: "Noto Sans KR", "Nanum Gothic", sans-serif;

  border-radius: 20px;
  font-weight: 600;
}

/* 페이지 구분선 스타일 */
.page-divider {
  margin: 40px 0;
  text-align: center;
  position: relative;
}

.page-divider-content {
  position: relative;
  display: inline-block;
}

.page-break-line {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  margin: 20px 0;
  width: 300px;
}

.page-break-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.9);
  padding: 0 15px;
}

.page-break-label .badge {
  font-size: 0.875rem;
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 폼 액션 버튼 스타일 */
.form-actions {
  padding: 30px 0;
  border-top: 1px solid rgba(232, 236, 244, 0.7);
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 15px;
  margin: 30px 0 0 0;
}

.form-actions .btn {
  min-width: 120px;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.form-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 반응형 페이지 네비게이션 */
@container card (max-width: 480px) {
  .page-navigation .d-flex,
  .bottom-page-navigation .d-flex {
    flex-direction: column;
    gap: 10px;
  }

  .page-navigation .btn,
  .bottom-page-navigation .btn {
    width: 100%;
    padding: 10px;
  }

  .page-break-line {
    width: 200px;
  }
}

/* 하단 페이지 네비게이션 스타일 */
.bottom-page-navigation,
#pageNavigation {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  margin: 30px 0;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.bottom-page-navigation .btn,
#pageNavigation .btn {
  border: 2px solid white;
  color: white;
  background: transparent;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  min-width: 100px;
}

.bottom-page-navigation .btn:hover:not(:disabled),
#pageNavigation .btn:hover:not(:disabled) {
  background: white;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.bottom-page-navigation .btn:disabled,
#pageNavigation .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bottom-page-navigation .badge,
#pageNavigation .badge {
  background: white !important;
  color: black;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;

  padding: 0px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  container-type: inline-size;
  container-name: card;
  font-family: "Noto Sans KR", "Nanum Gothic", sans-serif;
}

/* 스킨 관련 스타일 */
.preview-skin {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.skin-static-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

.skin-vertical-image {
  width: 100%;
  position: relative;
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: top center;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 스킨 텍스트 동적 크기 조정 */
.skin-text {
  line-height: 1.5;
  word-break: break-word;
  /* white-space: pre-wrap; */
  /* text-align: center; */
  /* text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7); */
}

.field {
  margin-bottom: 10px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(232, 236, 244, 0.7);
}

/* .ql-size-small {
  font-size: 0.75em;
}

.ql-size-large {
  font-size: 1.5em;
}

.ql-size-huge {
  font-size: 2.5em;
} */

.ql-direction-rtl {
  direction: rtl;
  text-align: inherit;
}

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

.ql-align-justify {
  text-align: justify;
}

.ql-align-right {
  text-align: right;
}

@container card (max-width: 400px) {
  .ql-size-small {
    font-size: 0.45em;
  }

  .ql-size-large {
    font-size: 0.9em;
  }

  .ql-size-huge {
    font-size: 1.5em;
  }
}

@container card (min-width: 401px) and (max-width: 768px) {
  .ql-size-small {
    font-size: 0.6em;
  }

  .ql-size-large {
    font-size: 1.2em;
  }

  .ql-size-huge {
    font-size: 2em;
  }
}

@container card (min-width: 769px) {
  .ql-size-small {
    font-size: 0.75em;
  }

  .ql-size-large {
    font-size: 1.5em;
  }

  .ql-size-huge {
    font-size: 2.5em;
  }
}

/* 라디오 버튼 스타일 */
.radio-field {
  margin-bottom: 1.5rem;
}

.radio-field .form-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
  display: block;
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

.radio-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(224, 224, 224, 0.7);
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.85);
}

.radio-option:hover {
  border-color: #4285f4;
  background-color: rgba(248, 249, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.1);
}

.radio-option:has(.radio-input:checked) {
  border-color: #4285f4;
  background-color: rgba(240, 244, 255, 0.9);
  box-shadow: 0 2px 12px rgba(66, 133, 244, 0.2);
}

.radio-input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #4285f4;
  cursor: pointer;
}

.radio-label {
  font-size: clamp(0.875rem, 2.2vw, 1rem);
  color: #333;
  cursor: pointer;
  margin: 0;
  line-height: 1.4;
  font-weight: 500;
  flex: 1;
  display: block;
  padding: 2px 0;
}

.radio-option:has(.radio-input:checked) .radio-label {
  color: #4285f4;
  font-weight: 600;
}

/* 반응형 라디오 버튼 */
@container card (max-width: 480px) {
  .radio-options {
    gap: 0.5rem;
  }

  .radio-option {
    padding: 0.625rem;
  }

  .radio-input {
    width: 16px;
    height: 16px;
  }
}

@container card (min-width: 769px) {
  .radio-options {
    gap: 1rem;
  }

  .radio-option {
    padding: 1rem;
  }

  .radio-input {
    width: 20px;
    height: 20px;
  }
}

/* 체크박스 선택 제한 스타일 */
.selection-count {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  font-weight: 500;
}

.form-check-input:disabled + .form-check-label {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-check-input:disabled {
  cursor: not-allowed;
}

[data-checkbox-group] {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 10px;
  transition: border-color 0.3s ease;
  background: rgba(255, 255, 255, 0.85);
}

[data-checkbox-group]:focus-within {
  border-color: #667eea;
}

.field-label .text-info {
  font-size: 0.875rem;
  font-weight: normal;
  color: #0066cc;
}

/* 전화번호 입력 필드 스타일 */
.tel-input {
  font-family: "Courier New", monospace;
  letter-spacing: 0.5px;
  font-size: 1rem;
}

.tel-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.tel-input::placeholder {
  font-family: "Noto Sans KR", "Nanum Gothic", sans-serif;
  color: #9ca3af;
}

/* 갤러리 필드 스타일 */
.gallery-field {
  margin-bottom: 1.5rem;
}

.gallery-container {
  margin-top: 0.75rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.gallery-item {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-view-btn {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.gallery-view-btn:hover {
  background: #fff;
  transform: scale(1.1);
}

.gallery-view-btn i {
  color: #333;
  font-size: 1.2rem;
}

.gallery-caption {
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #666;
  text-align: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 1px solid #e9ecef;
  font-weight: 500;
}

.gallery-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #6c757d;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}

.gallery-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.gallery-empty-text {
  font-size: 1rem;
  font-weight: 500;
}

/* 이미지 모달 스타일 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  cursor: pointer;
  backdrop-filter: blur(5px);
}

.image-modal-content {
  position: relative;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  max-width: 95%;
  max-height: 95%;
}

.modal-image {
  max-width: 100%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.image-modal-close:hover {
  opacity: 0.7;
}

.modal-caption {
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  font-size: 1.1rem;
  margin-top: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  max-width: 80%;
}

/* 모바일 대응 */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .gallery-caption {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  .gallery-view-btn {
    width: 40px;
    height: 40px;
  }

  .gallery-view-btn i {
    font-size: 1rem;
  }

  .image-modal-close {
    font-size: 2.5rem;
    top: 15px;
    right: 20px;
  }

  .modal-caption {
    font-size: 1rem;
    padding: 1rem;
    max-width: 90%;
  }

  .gallery-empty {
    padding: 2rem 1rem;
  }

  .gallery-empty-icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .gallery-caption {
    font-size: 0.75rem;
    padding: 0.375rem;
  }

  .modal-caption {
    font-size: 0.9rem;
  }
}
