/* ============================================================
   Cross-platform PWA install control and instruction dialog
   Shared by login.html and index.html.
   ============================================================ */

.pwa-install-slot {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(2, 119, 189, 0.35);
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.pwa-install-btn:hover:not(:disabled) {
  background: #bae6fd;
  border-color: rgba(2, 119, 189, 0.65);
  transform: translateY(-1px);
}

.pwa-install-btn:focus-visible,
.pwa-install-action:focus-visible,
.pwa-install-close:focus-visible {
  outline: 3px solid rgba(79, 195, 247, 0.58);
  outline-offset: 2px;
}

.pwa-install-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-install-slot {
  justify-content: center;
  min-height: 0;
  margin-top: 12px;
}

.login-install-slot .pwa-install-btn {
  border-color: rgba(79, 195, 247, 0.38);
  border-radius: 18px;
  background: rgba(79, 195, 247, 0.08);
  color: #4fc3f7;
}

.login-install-slot .pwa-install-btn:hover:not(:disabled) {
  background: rgba(79, 195, 247, 0.16);
  border-color: rgba(79, 195, 247, 0.58);
}

.pwa-install-modal[hidden] {
  display: none !important;
}

.pwa-install-modal {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.pwa-install-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 23, 0.68);
  backdrop-filter: blur(3px);
}

.pwa-install-panel {
  position: relative;
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 16px;
  background: #0d1b2e;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  color: #e2e8f0;
}

.pwa-install-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  border-radius: 12px;
  place-items: center;
  background: rgba(79, 195, 247, 0.16);
  color: #7dd3fc;
  font-size: 18px;
}

.pwa-install-panel h2 {
  margin: 0;
  color: #f8fafc;
  font-size: 19px;
  line-height: 1.3;
}

.pwa-install-intro {
  margin: 9px 0 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
}

.pwa-install-steps {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding-left: 22px;
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.5;
}

.pwa-install-steps li::marker {
  color: #7dd3fc;
  font-weight: 700;
}

.pwa-install-note {
  margin: 18px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.5;
}

.pwa-install-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.pwa-install-action,
.pwa-install-close {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.pwa-install-action {
  padding: 8px 15px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
}

.pwa-install-action:hover {
  background: rgba(148, 163, 184, 0.22);
}

.pwa-install-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: transparent;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
}

.pwa-install-close:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #f8fafc;
}

@media (max-width: 600px) {
  .topbar-right .pwa-install-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
  }

  .topbar-right .pwa-install-label {
    display: none;
  }

  .pwa-install-panel {
    padding: 24px 20px 20px;
  }
}
