/* =========================================================
   CHATELITE INSTALL PROMPT
   ========================================================= */

.install-prompt-wrap {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 18px;

  z-index: 99999;

  display: flex;
  justify-content: center;
  pointer-events: none;

  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.install-prompt {
  pointer-events: auto;

  width: 100%;
  max-width: 440px;

  display: flex;
  align-items: center;
  gap: 12px;

  padding: 13px 14px;

  background: linear-gradient(
    135deg,
    #1b4db1 0%,
    #245bc4 55%,
    #17439e 100%
  );

  border: 1px solid rgba(255, 255, 255, 0.16);

  border-radius: 18px;

  box-shadow:
    0 18px 45px rgba(20, 61, 145, 0.35),
    0 6px 18px rgba(0, 0, 0, 0.18);

  position: relative;

  opacity: 0;
  visibility: hidden;

  transform: translateY(35px) scale(0.96);

  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.3s ease;
}


/* Visible state */

.install-prompt-wrap.is-visible .install-prompt {
  opacity: 1;
  visibility: visible;

  transform: translateY(0) scale(1);
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.install-prompt-close {
  position: absolute;

  top: -8px;
  right: -7px;

  width: 23px;
  height: 23px;

  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);

  background: rgba(10, 42, 105, 0.9);

  color: rgba(255, 255, 255, 0.9);

  font-size: 14px;
  font-weight: 500;

  line-height: 1;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.install-prompt-close:hover {
  background: rgba(255, 255, 255, 0.2);

  transform: scale(1.08);
}


/* =========================================================
   APP ICON
   ========================================================= */

.install-prompt-icon {
  width: 48px;
  height: 48px;

  flex-shrink: 0;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.16);

  border: 1px solid rgba(255, 255, 255, 0.2);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 21px;

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 6px 15px rgba(0, 0, 0, 0.12);
}


/* =========================================================
   INFORMATION
   ========================================================= */

.install-prompt-info {
  flex: 1;
  min-width: 0;
}

.install-prompt-name {
  font-size: 14px;
  font-weight: 750;

  color: #fff;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  letter-spacing: -0.1px;
}

.install-prompt-meta {
  display: flex;
  align-items: center;

  gap: 5px;

  margin-top: 4px;

  font-size: 11.5px;

  color: rgba(255, 255, 255, 0.72);

  white-space: nowrap;
}

.install-prompt-stars {
  color: #ffd45a;

  letter-spacing: -1px;

  font-size: 12px;

  text-shadow: 0 1px 5px rgba(255, 196, 0, 0.25);
}

.install-prompt-dot {
  color: rgba(255, 255, 255, 0.45);
}


/* =========================================================
   INSTALL BUTTON
   ========================================================= */

.install-prompt-btn {
  flex-shrink: 0;

  padding: 9px 17px;

  border-radius: 999px;

  background: #fff;

  color: #1b4db1;

  font-size: 12.5px;
  font-weight: 750;

  text-decoration: none;

  white-space: nowrap;

  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.16);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.install-prompt-btn:hover {
  background: #f5f8ff;

  transform: translateY(-1px);

  box-shadow:
    0 7px 17px rgba(0, 0, 0, 0.2);
}

.install-prompt-btn:active {
  transform: translateY(1px);
}


/* =========================================================
   SMALL SCREENS
   ========================================================= */

@media (max-width: 380px) {

  .install-prompt-wrap {
    left: 9px;
    right: 9px;
    bottom: 12px;
  }

  .install-prompt {
    gap: 9px;

    padding: 11px 11px;

    border-radius: 16px;
  }

  .install-prompt-icon {
    width: 43px;
    height: 43px;

    border-radius: 12px;

    font-size: 19px;
  }

  .install-prompt-name {
    max-width: 120px;
    font-size: 13px;
  }

  .install-prompt-meta {
    font-size: 10.5px;
  }

  .install-prompt-btn {
    padding: 8px 13px;
    font-size: 11.5px;
  }
}