/*
 * Zenara Gold OS
 * V5.17.0e0b — Secure Email Forgot Password Foundation
 * Scope: Settings install card, standalone presentation, and controlled PWA update notice.
 */

body.zenara-hostinger-shell #settings .pwa-install-card {
  overflow: hidden;
}

body.zenara-hostinger-shell #settings .pwa-install-head {
  align-items: center;
}

body.zenara-hostinger-shell #settings .pwa-install-content {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

body.zenara-hostinger-shell #settings .pwa-install-brand {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #C9A227, #F3D36B);
  box-shadow: 0 10px 24px rgba(201, 162, 39, .22);
}

body.zenara-hostinger-shell #settings .pwa-install-copy {
  min-width: 0;
}

body.zenara-hostinger-shell #settings .pwa-install-copy strong {
  display: block;
  color: #0F172A;
  font-size: 16px;
  line-height: 1.25;
}

body.zenara-hostinger-shell #settings .pwa-install-copy p {
  margin: 5px 0 0;
  color: #64748B;
  font-size: 13px;
  line-height: 1.45;
}

body.zenara-hostinger-shell #settings .pwa-install-btn {
  min-width: 150px;
  white-space: nowrap;
}

body.zenara-hostinger-shell #settings .pwa-install-btn[disabled] {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
}

body.zenara-hostinger-shell #settings .pwa-install-status {
  min-height: 20px;
  margin-top: 12px;
  text-align: right;
}

body.zenara-hostinger-shell #settings .pwa-install-card[data-state="installed"] .pwa-install-btn {
  display: none;
}

body.zenara-hostinger-shell #settings .pwa-install-card[data-state="installed"] #pwaInstallBadge {
  color: #15803D;
  background: #DCFCE7;
  border-color: #BBF7D0;
}

html.zenara-standalone,
html.zenara-standalone body {
  min-height: 100%;
  background-color: #F8F7F3;
}

@media (display-mode: standalone) {
  html, body {
    overscroll-behavior-y: none;
  }
}


/* Mobile install reminder: shown at most once every 24 hours until installed. */
.pwa-install-reminder-backdrop[hidden] {
  display: none !important;
}

.pwa-install-reminder-backdrop {
  position: fixed;
  inset: 0;
  z-index: 940;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .18s ease;
}

.pwa-install-reminder-backdrop.is-visible {
  opacity: 1;
}

.pwa-install-reminder-card {
  width: min(390px, 100%);
  padding: 22px;
  border: 1px solid rgba(201, 162, 39, .28);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
  text-align: center;
  transform: translateY(12px) scale(.985);
  transition: transform .18s ease;
}

.pwa-install-reminder-backdrop.is-visible .pwa-install-reminder-card {
  transform: translateY(0) scale(1);
}

.pwa-install-reminder-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #C9A227, #F3D36B);
  box-shadow: 0 14px 30px rgba(201, 162, 39, .26);
}

.pwa-install-reminder-copy strong {
  display: block;
  color: #0F172A;
  font-size: 19px;
  line-height: 1.3;
}

.pwa-install-reminder-copy p {
  margin: 8px auto 0;
  max-width: 300px;
  color: #64748B;
  font-size: 13.5px;
  line-height: 1.55;
}

.pwa-install-reminder-actions {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 10px;
  margin-top: 20px;
}

.pwa-install-reminder-actions button {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

.pwa-install-reminder-actions button:disabled {
  cursor: wait;
  opacity: .58;
}

.pwa-install-reminder-later {
  border: 1px solid #E2E8F0;
  color: #334155;
  background: #fff;
}

.pwa-install-reminder-install {
  border: 1px solid #B58E1D;
  color: #fff;
  background: linear-gradient(135deg, #B58E1D, #D8B447);
  box-shadow: 0 10px 24px rgba(201, 162, 39, .22);
}

.pwa-install-reminder-later:focus-visible,
.pwa-install-reminder-install:focus-visible {
  outline: 3px solid rgba(201, 162, 39, .3);
  outline-offset: 2px;
}

.pwa-update-notice[hidden] {
  display: none !important;
}

.pwa-update-notice {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 950;
  width: min(440px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(201, 162, 39, .3);
  border-radius: 22px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(10px) scale(.985);
  transition: opacity .18s ease, transform .18s ease;
}

.pwa-update-notice.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pwa-update-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(135deg, #C9A227, #F3D36B);
  box-shadow: 0 10px 24px rgba(201, 162, 39, .24);
}

.pwa-update-body {
  min-width: 0;
}

.pwa-update-copy strong {
  display: block;
  color: #0F172A;
  font-size: 15px;
  line-height: 1.3;
}

.pwa-update-copy p {
  margin: 4px 0 0;
  color: #64748B;
  font-size: 12.5px;
  line-height: 1.45;
}

.pwa-update-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 12px;
}

.pwa-update-actions button {
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.pwa-update-actions button:disabled {
  cursor: wait;
  opacity: .58;
}

.pwa-update-later {
  border: 1px solid #E2E8F0;
  color: #334155;
  background: #fff;
}

.pwa-update-apply {
  border: 1px solid #0F172A;
  color: #fff;
  background: #0F172A;
  box-shadow: 0 9px 22px rgba(15, 23, 42, .16);
}

@media (max-width: 768px) {
  html.zenara-mobile-v2 body.zenara-mobile-v2.zenara-hostinger-shell
  #settings .pwa-install-content {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
  }

  html.zenara-mobile-v2 body.zenara-mobile-v2.zenara-hostinger-shell
  #settings .pwa-install-brand {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 14px;
  }

  html.zenara-mobile-v2 body.zenara-mobile-v2.zenara-hostinger-shell
  #settings .pwa-install-copy strong {
    font-size: 14px;
  }

  html.zenara-mobile-v2 body.zenara-mobile-v2.zenara-hostinger-shell
  #settings .pwa-install-copy p {
    font-size: 12px;
  }

  html.zenara-mobile-v2 body.zenara-mobile-v2.zenara-hostinger-shell
  #settings .pwa-install-btn {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin-top: 2px;
  }

  html.zenara-mobile-v2 body.zenara-mobile-v2.zenara-hostinger-shell
  #settings .pwa-install-status {
    text-align: center;
    margin-top: 9px;
  }

  .pwa-install-reminder-card {
    padding: 20px;
    border-radius: 22px;
  }

  .pwa-install-reminder-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 17px;
  }

  .pwa-install-reminder-copy strong {
    font-size: 18px;
  }

  .pwa-install-reminder-actions {
    margin-top: 18px;
  }

  .pwa-update-notice {
    left: 12px;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: auto;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
    border-radius: 19px;
  }

  body.auth-ready:not(.auth-required):not(.loading) .pwa-update-notice {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .pwa-update-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 13px;
  }

  .pwa-update-copy strong {
    font-size: 14px;
  }

  .pwa-update-copy p {
    font-size: 12px;
  }

  .pwa-update-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 8px;
    margin-top: 10px;
  }

  .pwa-update-actions button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-install-reminder-backdrop,
  .pwa-install-reminder-card,
  .pwa-update-notice {
    transition-duration: .01ms;
  }
}
