/* install-prompt.css — 앱 설치 버튼·안내 시트 (install-prompt.js 전용)
 * 인라인 스타일을 쓰지 않는 CSP(style-src 'self') 환경이라, 주입하는 화면의 모양은
 * 모두 이 파일의 클래스로만 만든다.
 */
.sbi-pill[hidden],
.sbi-sheet[hidden],
.sbi-toast[hidden] {
  display: none !important;
}

body.sbi-sheet-open {
  overflow: hidden;
}

.sbi-pill {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, calc(env(safe-area-inset-bottom) + 16px));
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border: 1px solid var(--line-strong, #DDE2E8);
  border-radius: 999px;
  background: var(--surface, #fff);
  color: var(--text, #191F28);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-2, 0 8px 24px rgba(23, 31, 40, 0.12));
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.sbi-pill:hover {
  transform: translateY(-1px);
}

.sbi-pill:active {
  transform: translateY(0);
}

.sbi-pill--primary {
  background: var(--accent, #3346E8);
  border-color: transparent;
  color: var(--accent-ink, #fff);
}

.sbi-pill__ico {
  width: 17px;
  height: 17px;
  flex: none;
}

.sbi-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sbi-sheet__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(10, 11, 13, 0.52);
  cursor: pointer;
}

.sbi-sheet__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--surface, #fff);
  color: var(--text, #191F28);
  box-shadow: 0 -12px 40px rgba(10, 11, 13, 0.28);
}

.sbi-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 4px;
}

.sbi-sheet__title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sbi-sheet__sub {
  margin: 6px 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2, #4A5563);
}

.sbi-sheet__close {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line, #EEF1F4);
  border-radius: 50%;
  background: var(--surface-2, #F2F4F6);
  color: var(--text-2, #4A5563);
  cursor: pointer;
}

.sbi-sheet__close svg {
  width: 16px;
  height: 16px;
}

.sbi-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.sbi-sheet__actions[hidden] { display: none; }

.sbi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong, #DDE2E8);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--text, #191F28);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.sbi-btn--primary {
  background: var(--accent, #3346E8);
  border-color: transparent;
  color: var(--accent-ink, #fff);
}

.sbi-sheet__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.sbi-sheet__steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-2, #4A5563);
}

.sbi-sheet__num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-soft, #E8EBFF);
  color: var(--accent-strong, #2432B8);
  font-size: 11.5px;
  font-weight: 800;
}

.sbi-sheet__steps b {
  color: var(--text, #191F28);
}

.sbi-sheet__note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line, #EEF1F4);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-3, #5F6B7A);
}

/* 폰에서는 PC용 설치 파일을 작은 링크로만 둔다(큰 버튼으로 두면 잘못 누른다) */
.sbi-sheet__pc {
  display: inline-block;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-3, #5F6B7A);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sbi-sheet__pc[hidden] { display: none; }

.sbi-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  max-width: min(92vw, 420px);
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--text, #191F28);
  color: var(--bg, #fff);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-2, 0 8px 24px rgba(23, 31, 40, 0.2));
}

@media (min-width: 720px) {
  .sbi-sheet {
    align-items: center;
    padding: 24px;
  }

  .sbi-sheet__panel {
    border-radius: 20px;
    padding-bottom: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sbi-pill {
    transition: none;
  }
}

/* 떠 있는 설치 버튼이 마지막 내용을 가리지 않게(폰 화면에서만) */
@media (max-width: 720px) {
  body.has-install-pill {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
}
