/**
 * Dealy - PWA 설치 안내 스타일
 */

/* ========== 설치 버튼 (떠있는 버튼 - 로그인 전만) ========== */
.pwa-install-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  
  display: flex;
  align-items: center;
  gap: 8px;
  
  padding: 12px 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 50px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  
  z-index: 9999;
  
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInRight 0.5s ease-out, pulse 2s ease-in-out 1s infinite;
}

/* 로그인 후에는 floating 버튼 완전히 숨기기 */
body.logged-in .pwa-install-btn {
  display: none !important;
}

/* ========== 헤더 설치 버튼 (로그인 후, 모바일만) ========== */
.btn-header-install {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-header-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-header-install:active {
  transform: translateY(0);
}

.btn-header-install svg {
  width: 20px;
  height: 20px;
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.pwa-install-btn:active {
  transform: translateY(0);
}

@keyframes slideInRight {
  from {
    transform: translateX(200px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.6);
  }
}

/* ========== 설치 가이드 모달 ========== */
.install-guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeIn 0.3s;
}

.install-guide-modal {
  background: white;
  border-radius: 20px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUpBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpBounce {
  from {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ========== 가이드 헤더 ========== */
.install-guide-header {
  padding: 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8f5f0 100%);
}

.install-guide-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.guide-close {
  width: 32px;
  height: 32px;
  border: none;
  background: white;
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-close:hover {
  background: var(--gray-200);
  color: var(--text-primary);
}

/* ========== 가이드 바디 ========== */
.install-guide-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.guide-step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 12px;
  transition: all 0.2s;
}

.guide-step:hover {
  background: var(--gray-100);
  transform: translateX(4px);
}

.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

.step-content {
  flex: 1;
}

.step-title {
  margin: 0 0 12px 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
}

.step-title strong {
  color: var(--primary);
  font-weight: 700;
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border: 2px dashed var(--gray-300);
}

/* ========== 가이드 노트 ========== */
.guide-note {
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
  border-radius: 12px;
  border-left: 4px solid #ffa726;
}

.guide-note p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.guide-note strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ========== 가이드 푸터 ========== */
.install-guide-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: center;
}

.install-guide-footer .btn {
  min-width: 120px;
}

/* ========== 모바일 최적화 ========== */
@media (max-width: 768px) {
  .pwa-install-btn {
    bottom: 16px;
    right: 16px;
    font-size: 14px;
    padding: 10px 16px;
  }
  
  .install-guide-overlay {
    padding: 0;
    align-items: flex-end;
  }
  
  .install-guide-modal {
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
  }
  
  .install-guide-header {
    padding: 20px;
  }
  
  .install-guide-body {
    padding: 20px;
  }
  
  .guide-step {
    padding: 12px;
  }
  
  .step-number {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .step-title {
    font-size: 14px;
  }
  
  .step-icon svg {
    width: 24px;
    height: 24px;
  }
}
