/* Web install prompt, illustration viewer and install prompt actions. */
.install-prompt[hidden] {
  display: none;
}

.install-prompt {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
}

.install-prompt-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 24, 37, 0.42);
  backdrop-filter: blur(10px);
  padding: 0;
  cursor: pointer;
}

.install-prompt-card {
  position: relative;
  width: min(460px, 100%);
  max-height: min(88dvh, 720px);
  overflow: auto;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  border: 1px solid #d7e6f1;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(34, 158, 217, 0.16), rgba(34, 158, 217, 0) 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 254, 0.98));
  box-shadow: 0 28px 64px rgba(11, 35, 54, 0.24);
  animation: install-prompt-rise 0.24s ease;
}

.install-prompt-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #d8e7f2;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #5b7183;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.install-prompt-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.install-prompt-close:hover {
  background: #fff;
  color: #1a6f9e;
  transform: translateY(-1px);
}

.install-prompt-brand {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding-right: 44px;
}

.install-prompt-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  object-position: center;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d8e7f2;
}

.install-prompt-kicker {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #2c7297;
}

.install-prompt-copy h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.install-prompt-copy p {
  margin: 6px 0 0;
  color: #5d7284;
  line-height: 1.4;
}

.install-prompt-body {
  display: grid;
  gap: 12px;
  color: #274357;
}

.install-prompt-body p {
  margin: 0;
  line-height: 1.52;
}

.install-prompt-illustration-wrap {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #d7e8f2;
  background: rgba(255, 255, 255, 0.82);
}

.install-prompt-illustration {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.install-prompt-illustration-trigger {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: left;
}

.install-prompt-illustration-trigger:hover .install-prompt-illustration-wrap {
  box-shadow: 0 16px 36px rgba(18, 61, 87, 0.16);
  transform: translateY(-1px);
}

.install-prompt-illustration-wrap {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.install-prompt-illustration-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34, 158, 217, 0.1);
  color: #1f6e9b;
  font-size: 13px;
  font-weight: 700;
}

.install-image-viewer[hidden] {
  display: none !important;
}

.install-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
}

.install-image-viewer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 17, 27, 0.78);
  backdrop-filter: blur(14px);
  padding: 0;
  cursor: pointer;
}

.install-image-viewer-card {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 28px));
  max-height: min(92dvh, 980px);
  display: grid;
  gap: 14px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border: 1px solid rgba(215, 232, 242, 0.32);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(13, 24, 34, 0.92), rgba(7, 15, 22, 0.96)),
    radial-gradient(circle at top right, rgba(34, 158, 217, 0.18), rgba(34, 158, 217, 0) 40%);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
}

.install-image-viewer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(190, 217, 232, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #f3fbff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.install-image-viewer-close:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.install-image-viewer-close svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.install-image-viewer-head {
  padding-right: 52px;
  color: #f3fbff;
}

.install-image-viewer-kicker {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #8fd6ff;
}

.install-image-viewer-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.install-image-viewer-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(201, 224, 236, 0.16);
}

.install-image-viewer-stage img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: min(78dvh, 860px);
  height: auto;
  object-fit: contain;
}

.install-prompt-benefits,
.install-prompt-steps {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: #37566d;
}

.install-prompt-note {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #d7e8f2;
  background: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.install-prompt-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.install-prompt-primary,
.install-prompt-secondary,
.install-prompt-tertiary {
  border: 0;
  border-radius: 16px;
  font: inherit;
  cursor: pointer;
}

.install-prompt-primary,
.install-prompt-secondary {
  min-height: 48px;
  padding: 12px 16px;
  font-weight: 700;
}

.install-prompt-primary {
  color: #fff;
  background: linear-gradient(180deg, #27a8e5, #178fc7);
  box-shadow: 0 14px 30px rgba(23, 143, 199, 0.28);
}

.install-prompt-secondary {
  color: #1d5f87;
  background: #eaf5fc;
  border: 1px solid #c8e3f3;
}

.install-prompt-tertiary {
  margin-top: 10px;
  min-height: 42px;
  padding: 10px 12px;
  background: transparent;
  color: #60778a;
}

.install-prompt-primary:hover,
.install-prompt-secondary:hover,
.install-prompt-tertiary:hover {
  transform: translateY(-1px);
}

@keyframes install-prompt-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
