/**
 * POE2 퀘스트 가이드 팝업 스타일
 * 모션 디자인 시스템 v1.0 준수
 */

/* 모션 토큰 정의 */
:root {
  --duration-fast: 150ms;
  --duration-medium: 300ms;
  --duration-slow: 500ms;
  --easing-standard: ease-out;
  --easing-exit: ease-in;
  --easing-in-out: ease-in-out;
  
  /* 팝업 컬러 시스템 */
  --popup-overlay: rgba(0, 0, 0, 0.6);
  --popup-bg: #ffffff;
  --popup-border: rgba(0, 0, 0, 0.1);
  --popup-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  --popup-text: #2c3e50;
  --popup-text-secondary: #7f8c8d;
  
  /* 버튼 컬러 */
  --btn-primary-bg: #3498db;
  --btn-primary-hover: #2980b9;
  --btn-primary-active: #21618c;
  --btn-secondary-bg: #ecf0f1;
  --btn-secondary-hover: #d5dbdb;
  --btn-secondary-text: #34495e;
}

/* 팝업 오버레이 */
.poe2-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--popup-overlay);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  
  /* 등장 애니메이션 */
  opacity: 0;
  animation: poe2-popup-fade-in var(--duration-medium) var(--easing-standard) forwards;
}

/* 팝업 컨테이너 */
.poe2-popup-container {
  position: relative;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  
  /* 등장 애니메이션 */
  transform: translateY(20px) scale(0.95);
  animation: poe2-popup-slide-in var(--duration-medium) var(--easing-standard) forwards;
}

/* 팝업 콘텐츠 */.poe2-popup-content {
  background: var(--popup-bg);
  border-radius: 16px;
  border: 1px solid var(--popup-border);
  box-shadow: var(--popup-shadow);
  overflow: hidden;
}

/* 팝업 헤더 */
.poe2-popup-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--popup-border);
}

.poe2-popup-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--popup-text);
  line-height: 1.3;
}

/* 팝업 바디 */
.poe2-popup-body {
  padding: 20px 24px;
}

.poe2-popup-message {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--popup-text);
  line-height: 1.5;
}

.poe2-popup-quest-info {
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--btn-primary-bg);
}

.poe2-popup-quest-name {
  font-weight: 600;
  color: var(--popup-text);
  font-size: 14px;
}/* 팝업 푸터 */
.poe2-popup-footer {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* 버튼 스타일 */
.poe2-popup-btn {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--easing-standard);
  position: relative;
  overflow: hidden;
  outline: none;
  
  /* 포커스 상태 */
  &:focus-visible {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
  }
}

/* 기본 버튼 (이어서 하기) */
.poe2-popup-btn-primary {
  background: var(--btn-primary-bg);
  color: white;
  
  &:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
  }
  
  &:active {
    background: var(--btn-primary-active);
    transform: translateY(0);
    transition-duration: var(--duration-fast);
  }
}

/* 보조 버튼 (닫기) */
.poe2-popup-btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  
  &:hover {
    background: var(--btn-secondary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  &:active {
    transform: translateY(0);
    transition-duration: var(--duration-fast);
  }
}/* 애니메이션 정의 */
@keyframes poe2-popup-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes poe2-popup-slide-in {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes poe2-popup-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes poe2-popup-slide-out {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
  }
}

/* 닫기 애니메이션 클래스 */
.poe2-popup-overlay.poe2-popup-closing {
  animation: poe2-popup-fade-out var(--duration-medium) var(--easing-exit) forwards;
}

.poe2-popup-overlay.poe2-popup-closing .poe2-popup-container {
  animation: poe2-popup-slide-out var(--duration-medium) var(--easing-exit) forwards;
}/* 반응형 디자인 */
@media (max-width: 768px) {
  .poe2-popup-container {
    width: 95%;
    margin: 0 auto;
  }
  
  .poe2-popup-header,
  .poe2-popup-body {
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .poe2-popup-footer {
    padding: 16px 20px 20px;
    flex-direction: column-reverse;
  }
  
  .poe2-popup-btn {
    width: 100%;
    justify-content: center;
  }
  
  .poe2-popup-title {
    font-size: 18px;
  }
  
  .poe2-popup-message {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .poe2-popup-container {
    width: 95%;
    max-width: 380px;
    margin: 0;
  }
  
  .poe2-popup-content {
    border-radius: 16px;
  }
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
  .poe2-popup-overlay,
  .poe2-popup-container,
  .poe2-popup-btn {
    animation: none !important;
    transition: none !important;
  }
  
  .poe2-popup-overlay {
    opacity: 1;
  }
  
  .poe2-popup-container {
    transform: none;
  }
}

/* 다크모드 지원 */
@media (prefers-color-scheme: dark) {
  :root {
    --popup-bg: #2c3e50;
    --popup-border: rgba(255, 255, 255, 0.1);
    --popup-text: #ecf0f1;
    --popup-text-secondary: #bdc3c7;
    --btn-secondary-bg: #34495e;
    --btn-secondary-hover: #4a5f7a;
    --btn-secondary-text: #ecf0f1;
  }
  
  .poe2-popup-quest-info {
    background: rgba(255, 255, 255, 0.05);
  }
}