/* RFP 시뮬레이터 커스텀 스타일 */

/* 기본 스타일 개선 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 포커스 접근성 개선 */
button:focus-visible, 
input:focus-visible, 
textarea:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* 범위 슬라이더 스타일 개선 */
input[type="range"] {
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
  background: #e5e7eb;
  height: 4px;
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  background: #6366f1;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -7px;
}

input[type="range"]::-moz-range-track {
  background: #e5e7eb;
  height: 4px;
  border-radius: 2px;
  border: none;
}

input[type="range"]::-moz-range-thumb {
  background: #6366f1;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* 차트 툴팁 스타일 개선 */
.recharts-tooltip-wrapper {
  border-radius: 8px !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.recharts-default-tooltip {
  border-radius: 8px !important;
  border: none !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* 애니메이션 개선 */
.transition-all {
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 접근성 - 움직임 줄이기 */
@media (prefers-reduced-motion: reduce) {
  .transition-all,
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 높은 대비 모드 지원 */
@media (prefers-contrast: high) {
  .bg-gray-50 {
    background-color: #ffffff !important;
  }
  
  .text-gray-600 {
    color: #000000 !important;
  }
  
  .border-gray-200 {
    border-color: #000000 !important;
  }
}

/* 파일 드롭존 스타일 */
.border-dashed:hover {
  border-color: #6366f1;
  background-color: #f8fafc;
}

/* 로딩 애니메이션 */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 레이더 차트 개선 */
.recharts-polar-grid-angle line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.recharts-polar-grid-concentric-polygon {
  stroke: #f3f4f6;
  stroke-width: 1;
}

/* 텍스트 줄바꿈 방지 - 단어 중간 줄바꿈 방지 */
button, .btn, .button {
  word-break: keep-all;
  white-space: nowrap;
  overflow-wrap: normal;
  hyphens: none;
}

/* 긴 버튼 텍스트의 경우 자동 줄바꿈 허용하되 단어 단위로 */
.btn-multiline, .button-multiline {
  white-space: normal;
  word-break: keep-all;
  line-height: 1.3;
}

/* 일반 텍스트 요소들도 단어 중간 줄바꿈 방지 */
h1, h2, h3, h4, h5, h6, p, span, div {
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: none;
}

/* 페이지 로드 시 스크롤 위치 초기화 */
html {
  scroll-behavior: smooth;
}

body {
  scroll-padding-top: 0;
}

/* 반응형 개선 */
@media (max-width: 768px) {
  .grid-cols-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
  }
  
  .grid-cols-5 button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    word-break: keep-all;
    white-space: normal;
    line-height: 1.2;
  }
  
  .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
/* 페르소나 생성 버튼 최적화 - 세로 배치 */
.persona-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  min-width: 0;
  width: fit-content;
}

.persona-action-buttons button {
  width: 100%;
  max-width: 180px;
  text-align: center;
  justify-content: center;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* 모바일 최적화 */
@media (max-width: 640px) {
  .persona-action-buttons button {
    max-width: 160px;
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}
