/* Install app button + confirmation (install-app.js), shared by both apps. */
.install-app-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 40px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
}

.install-app-button[hidden] {
  display: none;
}

.install-app-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:root[data-theme="light"] .install-app-button,
html.desktop-glass .install-app-button {
  border-color: rgba(20, 30, 50, 0.14);
  background: rgba(20, 30, 50, 0.04);
}

.learny-install-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(4, 6, 12, 0.6);
  opacity: 0;
  transition: opacity 200ms ease;
}

.learny-install-backdrop.is-visible {
  opacity: 1;
}

.learny-install-dialog {
  width: min(420px, 100%);
  box-sizing: border-box;
  padding: 22px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #16171d;
  color: #f3f4f8;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  transform: translateY(8px) scale(0.96);
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1);
}

.learny-install-backdrop.is-visible .learny-install-dialog {
  transform: none;
}

.learny-install-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(59, 140, 240, 0.35);
}

.learny-install-dialog h2 {
  margin: 12px 0 6px;
  font-size: 1.15rem;
}

.learny-install-dialog p {
  margin: 0 0 12px;
  color: rgba(243, 244, 248, 0.7);
  font-size: 0.9rem;
  line-height: 1.5;
}

.learny-install-steps,
.learny-install-perks {
  margin: 0 0 14px;
  padding: 12px 14px 12px 32px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: left;
}

.learny-install-steps[hidden] {
  display: none;
}

.learny-install-perks {
  list-style: none;
  padding-left: 14px;
}

.learny-install-perks li::before {
  content: "\2713";
  margin-right: 8px;
  color: #6fcf73;
  font-weight: 700;
}

.learny-install-actions {
  display: flex;
  gap: 10px;
}

.learny-install-actions button {
  flex: 1;
  height: 44px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  cursor: pointer;
}

.learny-install-cancel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: inherit;
}

.learny-install-confirm {
  border: 0;
  background: linear-gradient(135deg, #3b8cf0, #2f74de);
  color: #fff;
}

.learny-install-confirm:disabled {
  opacity: 0.6;
}

:root[data-theme="light"] .learny-install-dialog {
  border-color: rgba(20, 30, 50, 0.1);
  background: #ffffff;
  color: #14161c;
}

:root[data-theme="light"] .learny-install-dialog p {
  color: rgba(20, 22, 28, 0.68);
}

:root[data-theme="light"] .learny-install-steps,
:root[data-theme="light"] .learny-install-perks {
  background: rgba(20, 30, 50, 0.04);
}

:root[data-theme="light"] .learny-install-cancel {
  border-color: rgba(20, 30, 50, 0.16);
}

:root[data-theme="light"] .learny-install-perks li::before {
  color: #2e7d32;
}


/* Android app install help */
.learny-install-perks[hidden],
.learny-install-note[hidden],
.learny-install-alt[hidden] {
  display: none;
}

.learny-install-dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.learny-install-steps li + li {
  margin-top: 8px;
}

.learny-install-steps strong {
  font-weight: 650;
}

.learny-install-note {
  margin: 0 0 14px;
  font-size: 0.8rem !important;
  line-height: 1.5;
}

.learny-install-alt {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: #6ea8ff;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

:root[data-theme="light"] .learny-install-alt {
  color: #2f74de;
}

@media (prefers-reduced-motion: reduce) {
  .learny-install-backdrop,
  .learny-install-dialog {
    transition: none;
  }
}
