/* pwa-install.css — LexiSport PWA install banner + 教學 modal styles */

/* ── iOS 浮動 banner ── */
#lexi-pwa-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 9999;
  background: linear-gradient(135deg, #FF6B35, #FF8C61);
  color: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 14px 16px;
  font-family: 'Noto Sans TC', sans-serif;
  animation: lexi-pwa-slideup 0.4s ease-out;
}

@keyframes lexi-pwa-slideup {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lexi-pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.lexi-pwa-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.lexi-pwa-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  min-width: 140px;
}

.lexi-pwa-text strong {
  font-weight: 700;
}

.lexi-pwa-cta {
  background: white;
  color: #FF6B35;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.lexi-pwa-cta:active {
  transform: scale(0.95);
}

.lexi-pwa-close {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 教學 modal ── */
#lexi-pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Noto Sans TC', sans-serif;
}

.lexi-pwa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.lexi-pwa-modal-content {
  position: relative;
  background: #FFF8F0;
  border-radius: 20px;
  max-width: 92vw;
  width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
  animation: lexi-pwa-modal-in 0.3s ease-out;
}

@keyframes lexi-pwa-modal-in {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lexi-pwa-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 4px 10px;
}

.lexi-pwa-modal-content h2 {
  font-size: 20px;
  margin: 0 0 8px;
  color: #1A1A1A;
}

.lexi-pwa-modal-sub {
  font-size: 14px;
  color: #666;
  margin: 0 0 18px;
}

.lexi-pwa-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lexi-pwa-steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px;
  background: white;
  border-radius: 12px;
  border-left: 4px solid #FF6B35;
}

.lexi-pwa-step-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #FFE0CF, #FFF1E5);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #FF6B35;
  font-weight: 700;
}

.lexi-pwa-step-img::before {
  content: attr(data-step);
}

.lexi-pwa-step-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.lexi-pwa-step-img:has(img) {
  background: none;
  font-size: 0;
}

.lexi-pwa-step-img:has(img)::before {
  content: none;
}

.lexi-pwa-step-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lexi-pwa-step-text strong {
  font-size: 15px;
  color: #1A1A1A;
  font-weight: 600;
}

.lexi-pwa-step-text span {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.lexi-pwa-modal-done {
  display: block;
  width: 100%;
  margin-top: 18px;
  background: #FF6B35;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s;
}

.lexi-pwa-modal-done:active {
  transform: scale(0.98);
}

/* ── 桌面提示 ── */
#lexi-pwa-desktop-hint {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 9998;
  background: white;
  border: 1px solid #FFE0CF;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #1A1A1A;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: 'Noto Sans TC', sans-serif;
  max-width: 360px;
}

.lexi-pwa-desktop-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

#lexi-pwa-desktop-close {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #999;
  padding: 0 4px;
}
