/**
 * Inquiry Button Styles
 *
 * 좌하단 고정 위치 1:1 문의 버튼 스타일
 * Requirements: 1.3, 1.4, 10.6
 */

/* 기본 버튼 스타일 */
.inquiry-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;

  display: flex;
  align-items: center;
  gap: 8px;

  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;

  font-size: 14px;
  font-weight: 600;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  cursor: pointer;

  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* 터치 영역 확보 */
  min-width: 44px;
  min-height: 44px;

  /* 텍스트 선택 방지 */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;

  /* 탭 포커스 스타일 */
  outline: none;
}

/* 호버 효과 */
.inquiry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #7c8ff0 0%, #8a5bb8 100%);
}

/* 활성화 효과 */
.inquiry-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

/* 포커스 효과 (키보드 접근성) */
.inquiry-button:focus-visible {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

/* 비활성화 상태 */
.inquiry-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.inquiry-button:disabled:hover {
  transform: none;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* SVG 아이콘 스타일 */
.inquiry-button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* 텍스트 스타일 */
.inquiry-button span {
  white-space: nowrap;
}

/* 애니메이션: 페이드인 */
@keyframes inquiryButtonFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.inquiry-button {
  animation: inquiryButtonFadeIn 0.3s ease-out;
}

/* 펄스 애니메이션 (선택적 - 주목도 향상) */
@keyframes inquiryButtonPulse {
  0%,
  100% {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6);
  }
}

.inquiry-button.pulse {
  animation: inquiryButtonPulse 2s ease-in-out infinite;
}

/* 태블릿 환경 (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
  .inquiry-button {
    bottom: 20px;
    left: 16px;
    padding: 11px 22px;
    font-size: 13px;
  }

  .inquiry-button svg {
    width: 18px;
    height: 18px;
  }
}

/* 모바일 환경 (< 768px) */
@media (max-width: 767px) {
  .inquiry-button {
    /* 우하단 모험단 표시와 겹치지 않도록 위치 조정 */
    bottom: 10px;
    left: 12px;
    padding: 10px 20px;
    font-size: 13px;

    /* 모바일에서 그림자 최적화 */
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
  }

  .inquiry-button:hover {
    /* 모바일에서는 호버 효과 제거 (터치 디바이스) */
    transform: none;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }

  .inquiry-button:active {
    /* 터치 피드백 */
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
  }

  .inquiry-button svg {
    width: 18px;
    height: 18px;
  }
}

/* 작은 모바일 환경 (< 375px) */
@media (max-width: 374px) {
  .inquiry-button {
    bottom: 10px;
    left: 10px;
    padding: 8px 16px;
    font-size: 12px;
  }

  .inquiry-button svg {
    width: 16px;
    height: 16px;
  }

  .inquiry-button span {
    /* 매우 작은 화면에서는 텍스트 숨기고 아이콘만 표시 */
    display: none;
  }

  .inquiry-button {
    border-radius: 50%;
    padding: 12px;
  }
}

/* 가로 모드 모바일 */
@media (max-width: 767px) and (orientation: landscape) {
  .inquiry-button {
    bottom: 12px;
    left: 12px;
    padding: 8px 18px;
    font-size: 12px;
  }

  .inquiry-button svg {
    width: 16px;
    height: 16px;
  }
}

/* 다크 모드 지원 (선택적) */
@media (prefers-color-scheme: dark) {
  .inquiry-button {
    background: linear-gradient(135deg, #7c8ff0 0%, #8a5bb8 100%);
    box-shadow: 0 4px 15px rgba(124, 143, 240, 0.4);
  }

  .inquiry-button:hover {
    background: linear-gradient(135deg, #8fa3f5 0%, #9d6fc8 100%);
    box-shadow: 0 6px 20px rgba(124, 143, 240, 0.6);
  }
}

/* 고대비 모드 지원 (접근성) */
@media (prefers-contrast: high) {
  .inquiry-button {
    border: 2px solid white;
    font-weight: 700;
  }

  .inquiry-button:focus-visible {
    outline: 4px solid white;
    outline-offset: 3px;
  }
}

/* 애니메이션 감소 모드 (접근성) */
@media (prefers-reduced-motion: reduce) {
  .inquiry-button {
    animation: none;
    transition: none;
  }

  .inquiry-button:hover {
    transform: none;
  }

  .inquiry-button:active {
    transform: none;
  }

  .inquiry-button.pulse {
    animation: none;
  }
}

/* 인쇄 시 숨김 */
@media print {
  .inquiry-button {
    display: none;
  }
}
