/* « Installer Triplan » prompt. Owned by assets/js/public/website/install-prompt.js.
   Buttons reuse .tp-consent__btn from cookie-consent.css. */

.tp-install {
  position: fixed;
  z-index: 100000;
  left: clamp(12px, 3vw, 24px);
  bottom: clamp(12px, 3vw, 24px);
  /* Same place as the cookie banner, which is always answered first. */
  width: min(420px, calc(100vw - 24px));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--tp-line, #E7E0D4);
  border-radius: var(--tp-card-radius, 18px);
  background: var(--tp-surface, #fff);
  color: var(--tp-ink, #0B2239);
  box-shadow: var(--tp-shadow-xl, 0 20px 46px rgba(15, 27, 45, 0.16));
  font-family: var(--tp-body-font, "Inter", system-ui, sans-serif);
  animation: tp-install-in 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tp-install.is-leaving {
  animation: tp-install-out 180ms ease forwards;
}

.tp-install__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--tp-muted, #5C6B79);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.tp-install__close:hover {
  background: var(--tp-cream, #F1ECE3);
  color: var(--tp-ink, #0B2239);
}

.tp-install__close:focus-visible {
  outline: 3px solid var(--tp-cyan, #1BBACA);
  outline-offset: 2px;
}

.tp-install__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 36px;
}

.tp-install__icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--tp-shadow-sm, 0 1px 3px rgba(15, 27, 45, 0.06));
}

.tp-install__title {
  margin: 0 0 2px;
  font: 700 18px/1.25 var(--tp-heading-font, "Bricolage Grotesque", system-ui, sans-serif);
  color: var(--tp-ink, #0B2239);
}

.tp-install__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tp-slate, #3A4A57);
}

.tp-install__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tp-install-step;
  display: grid;
  gap: 10px;
}

.tp-install__steps li {
  position: relative;
  padding-left: 36px;
  min-height: 26px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tp-slate, #3A4A57);
  counter-increment: tp-install-step;
}

.tp-install__steps li::before {
  content: counter(tp-install-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--tp-cyan-tint, #DDF6F8);
  color: var(--tp-accent-text, #066D79);
  font-size: 13px;
  font-weight: 700;
}

.tp-install__steps strong {
  color: var(--tp-ink, #0B2239);
}

.tp-install__steps i {
  color: var(--tp-accent-text, #066D79);
}

.tp-install__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 600px) {
  .tp-install {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    padding: 16px;
  }

  .tp-install__actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }

  .tp-install__actions .tp-consent__btn {
    min-width: 0;
  }
}

@keyframes tp-install-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tp-install-out {
  to { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
  .tp-install,
  .tp-install.is-leaving {
    animation: none;
  }

  .tp-install__close {
    transition: none;
  }
}
