/* 호버 효과 문제 해결 - 최소한의 개입 */

/* Select 요소의 화살표 완전 안정화 - 모든 상태에서 고정 */
.modern-form-select,
.modern-form-select:hover,
.modern-form-select:focus,
.modern-form-select:active,
.modern-form-select:focus-within,
select,
select:hover,
select:focus,
select:active,
select:focus-within,
.modern-form-input.modern-form-select,
.modern-form-input.modern-form-select:hover,
.modern-form-input.modern-form-select:focus,
.modern-form-input.modern-form-select:active,
.modern-form-input.modern-form-select:focus-within {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right var(--space-4) center !important;
  background-repeat: no-repeat !important;
  background-size: 1.5em 1.5em !important;
}

/* 추가 안전장치 - 드롭다운이 열린 상태에서도 화살표 고정 */
select[size]:hover,
select[multiple]:hover,
select:focus[size],
select:focus[multiple] {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right var(--space-4) center !important;
  background-repeat: no-repeat !important;
  background-size: 1.5em 1.5em !important;
}

/* 최종 안전장치 - 모든 가능한 상태 조합 */
select:not([multiple]):not([size]),
select:not([multiple]):not([size]):hover,
select:not([multiple]):not([size]):focus,
select:not([multiple]):not([size]):active,
.modern-form-select:not([multiple]):not([size]),
.modern-form-select:not([multiple]):not([size]):hover,
.modern-form-select:not([multiple]):not([size]):focus,
.modern-form-select:not([multiple]):not([size]):active {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
  background-position: right 1rem center !important;
  background-repeat: no-repeat !important;
  background-size: 1.5em 1.5em !important;
  appearance: none !important;
}
/* 핑
크빛 영역 문제 해결 - 불필요한 배경색 제거 */

/* 모든 프리셋 카드의 기본 배경을 투명으로 설정 */
.preset-card,
.preset-cards .preset-card {
  background: transparent !important;
  background-color: transparent !important;
}

/* 선택되지 않은 카드는 완전히 투명한 배경 */
.preset-card:not(.selected),
.preset-cards .preset-card:not(.selected) {
  background: transparent !important;
  background-color: transparent !important;
}

/* 빈 요소나 불필요한 여백 제거 */
.modern-form-section:empty,
.style-selection-section:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 불필요한 여백이나 패딩 제거 */
.modern-form-section::before,
.modern-form-section::after,
.style-selection-section::before,
.style-selection-section::after {
  display: none !important;
}

/* 폼 섹션 간 여백 정리 */
.modern-form-section {
  margin-bottom: var(--space-6) !important;
}

.modern-form-section:last-child {
  margin-bottom: 0 !important;
}

.submit-section {
  margin-top: 0 !important;
  padding-top: var(--space-4) !important;
}

/* 빈 div 요소 숨김 */
div:empty:not([id]):not([class*='loading']):not([class*='spinner']):not([class*='indicator']) {
  display: none !important;
}

  background: transparent !important;
  background-color: transparent !important;
} */

/* 숨겨진 디버그 컨테이너들의 여백 완전 제거 */
.generation-section .debug-composite-image.hidden,
.generation-section .debug-analysis-result.hidden,
.generation-section .analysis-error.hidden {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
}

/* generation-status 카드의 배경 투명화 */
.generation-status.modern-card,
.generation-status .modern-card-header,
.generation-status .modern-card-body {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
}

/* 이미지 생성 섹션 내 모든 요소의 불필요한 여백 제거 */
.generation-section > *:not(.text-center):not(h2) {
  margin-bottom: 0 !important;
}

/* 버튼 컨테이너와 다른 요소 사이의 여백 최소화 */
.generation-section .text-center {
  margin-top: var(--space-4) !important;
}

/* 이미지 생성 섹션의 제목과 버튼 사이 모든 요소 투명화 */
.generation-section h2 + * {
  background: transparent !important;
}

/* bg-error 클래스가 적용된 요소도 투명화 (숨겨진 상태에서) */
.generation-section .modern-card.bg-error.hidden {
  display: none !important;
  background: transparent !important;
}

/* 추가 안전장치 - 모든 modern-card 요소의 기본 배경 제거 */
.generation-section .modern-card:not(.clickable):not([role='button']):not(.interactive) {
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
} /* 
bg-error 클래스 오버라이드 - 이미지 생성 섹션에서만 */
.generation-section .bg-error,
.submit-section .bg-error {
  background-color: transparent !important;
  background: transparent !important;
}

/* 숨겨진 상태의 모든 요소는 완전히 제거 */
.generation-section .hidden,
.submit-section .hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden !important;
}

/* 이미지 생성 섹션의 모든 카드 요소 투명화 */
.generation-section [class*='card'],
.submit-section [class*='card'] {
  background: transparent !important;
  background-color: transparent !important;
}

/* 특별히 문제가 되는 요소들 타겟팅 */
.generation-section .modern-card.generation-status,
.generation-section .modern-card.debug-composite-image,
.generation-section .modern-card.debug-analysis-result,
.generation-section .modern-card.analysis-error {
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* mb-6 클래스가 적용된 요소의 여백도 조정 */
.generation-section .mb-6 {
  margin-bottom: var(--space-3) !important;
}
