/*
 * ============================================================================
 *  PWA — STYLES
 * ============================================================================
 *
 *  The install button and the iOS hint. Both are small, sit out of the way
 *  and never cover the canvas, the sheet or a toolbar.
 *
 * ============================================================================
 */

.tsite-install-btn {
  position: fixed;
  right: 18px;
  bottom: 74px;
  z-index: 2147483002;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(16, 16, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: rgba(255, 255, 255, 0.9);
  font: 600 13px/1 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.16s, background 0.16s;
}

.tsite-install-btn[hidden] {
  display: none !important;
}

.tsite-install-btn:hover {
  transform: translateY(-2px);
  background: rgba(28, 28, 40, 0.94);
}

.tsite-install-btn:active {
  transform: scale(0.97);
}

.tsite-install-btn:focus-visible {
  outline: 2px solid #7c6cff;
  outline-offset: 2px;
}

/* The label is dropped on a narrow screen: the icon alone is enough, and
   the button stays small enough not to cover the work. */
@media (max-width: 520px) {
  .tsite-install-btn {
    right: 12px;
    bottom: 64px;
    width: 42px;
    height: 42px;
    padding: 0;
    justify-content: center;
  }
  .tsite-install-label {
    display: none;
  }
}

/* ------------------------------------------------------- the iOS hint */

.tsite-install-note {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2147483003;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(16, 16, 24, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: rgba(255, 255, 255, 0.86);
  font: 500 13px/1.45 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  animation: tsite-install-rise 0.22s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes tsite-install-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.tsite-install-note span {
  flex: 1;
  min-width: 0;
}

.tsite-install-note-close {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.tsite-install-note-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* The hint sits above the app switcher button. */
@media (max-width: 520px) {
  .tsite-install-note {
    bottom: 64px;
  }
}
