/* ============================================================
   AMANA EXCELLENCE CENTER — PWA Install Component Styles
   Theme: Executive Navy (#0B2D5B) + Gold (#D4A017)
   ============================================================ */

/* ── Floating Install Button (Trigger) ────────────────────────── */
.pwa-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  background: linear-gradient(135deg, #0B2D5B 0%, #123E73 100%);
  color: #FFFFFF;
  border: 1.5px solid rgba(212, 160, 23, 0.45);
  border-radius: 999px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 45, 91, 0.28), 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.pwa-floating-btn:hover {
  background: linear-gradient(135deg, #123E73 0%, #0B2D5B 100%);
  border-color: #D4A017;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(11, 45, 91, 0.35), 0 0 0 3px rgba(212, 160, 23, 0.2);
  color: #FFFFFF;
}

.pwa-floating-btn:active {
  transform: translateY(0) scale(0.98);
}

.pwa-floating-btn__icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212, 160, 23, 0.18);
  color: #E8B832;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-floating-btn__badge {
  background: #D4A017;
  color: #0B2D5B;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  margin-left: 2px;
}

/* ── Modal Backdrop ───────────────────────────────────────────── */
.pwa-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 45, 91, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9995;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.pwa-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

/* ── Pop-Up Install Dialog ────────────────────────────────────── */
.pwa-install-dialog {
  position: fixed;
  z-index: 9999;
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(11, 45, 91, 0.22), 0 0 0 1px rgba(11, 45, 91, 0.08);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Desktop positioning: bottom right card */
@media (min-width: 641px) {
  .pwa-install-dialog {
    bottom: 30px;
    right: 30px;
    width: 390px;
    max-width: calc(100vw - 40px);
    transform: translateY(20px) scale(0.96);
  }
  .pwa-install-dialog.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
}

/* Mobile positioning: modern bottom sheet */
@media (max-width: 640px) {
  .pwa-install-dialog {
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    transform: translateY(100%);
  }
  .pwa-install-dialog.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .pwa-floating-btn {
    bottom: 20px;
    right: 16px;
    padding: 9px 14px 9px 10px;
    font-size: 13px;
  }
}

/* ── Dialog Content Elements ─────────────────────────────────── */
.pwa-dialog__header {
  padding: 20px 22px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #EEF2F6;
  background: #FAFBFD;
}

.pwa-dialog__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-dialog__logo-mark {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid rgba(212, 160, 23, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-dialog__logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.35);
  display: block;
}

.pwa-dialog__title-wrap {
  display: flex;
  flex-direction: column;
}

.pwa-dialog__title {
  font-size: 16px;
  font-weight: 800;
  color: #0B2D5B;
  line-height: 1.25;
  margin: 0;
}

.pwa-dialog__subtitle {
  font-size: 11.5px;
  font-weight: 600;
  color: #D4A017;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 3px;
}

.pwa-dialog__close-btn {
  background: transparent;
  border: none;
  color: #8C98A8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.pwa-dialog__close-btn:hover {
  background: #E8EAED;
  color: #1A1A2E;
}

.pwa-dialog__body {
  padding: 18px 22px 14px;
}

.pwa-dialog__desc {
  font-size: 13.5px;
  color: #4A5568;
  line-height: 1.5;
  margin: 0 0 16px;
}

/* Feature checklist */
.pwa-dialog__features {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
}

.pwa-dialog__feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: #2D3748;
  line-height: 1.4;
}

.pwa-dialog__feature-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(22, 163, 74, 0.12);
  color: #16A34A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.pwa-dialog__feature-icon svg {
  width: 11px;
  height: 11px;
}

/* Actions footer */
.pwa-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pwa-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #0B2D5B 0%, #164687 100%);
  color: #FFFFFF;
  border: 1px solid rgba(212, 160, 23, 0.35);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(11, 45, 91, 0.22);
  transition: all 0.22s ease;
  user-select: none;
}

.pwa-btn-primary:hover {
  background: linear-gradient(135deg, #123E73 0%, #0B2D5B 100%);
  box-shadow: 0 6px 18px rgba(11, 45, 91, 0.3);
  transform: translateY(-1px);
}

.pwa-btn-primary:active {
  transform: translateY(0);
}

.pwa-btn-primary svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.pwa-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 18px;
  background: transparent;
  color: #64748B;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pwa-btn-secondary:hover {
  background: #F1F5F9;
  color: #1E293B;
}

/* ── iOS Safari Guidance Box ──────────────────────────────────── */
.pwa-ios-instructions {
  display: none;
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
}

.pwa-ios-instructions.is-visible {
  display: block;
}

.pwa-ios-instructions ol {
  margin: 6px 0 0;
  padding-left: 20px;
}

.pwa-ios-instructions li {
  margin-bottom: 4px;
}

.pwa-ios-instructions strong {
  color: #0B2D5B;
}

/* ── Installed Success Toast ──────────────────────────────────── */
.pwa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  z-index: 10000;
  background: #0B2D5B;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid #D4A017;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-toast.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
