/* ==========================================================
   Badr Clinic - PWA Installation Styles (Clean, Modular)
========================================================== */

/* 1. Mobile Menu Install Option */
.mobile-menu-install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  margin: 10px 0;
  border-radius: 12px;
  background: rgba(18, 42, 107, 0.25);
  border: 1px solid rgba(18, 42, 107, 0.45);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.mobile-menu-install:hover,
.mobile-menu-install:focus-visible {
  background: rgba(18, 42, 107, 0.45);
  border-color: #FFFFFF;
  transform: translateY(-1px);
}

.mobile-menu-install-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 6px;
}

/* 2. Floating Install Toast Banner (Centered at Bottom) */
.pwa-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 440px;
  width: calc(100% - 32px);
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(9, 26, 56, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(18, 42, 107, 0.35);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(18, 42, 107, 0.18);
  color: #FFFFFF;
  animation: pwaSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

@keyframes pwaSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.pwa-toast-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pwa-toast-content {
  flex: 1;
  min-width: 0;
}

.pwa-toast-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.pwa-toast-desc {
  display: block;
  font-size: 0.78rem;
  color: #94A3B8;
  line-height: 1.35;
}

.pwa-toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pwa-install-btn {
  padding: 8px 14px;
  border-radius: 9px;
  border: none;
  background: #122A6B;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(18, 42, 107, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.pwa-install-btn:hover {
  background: #1A3E96;
  transform: translateY(-1px);
}

.pwa-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: transparent;
  color: #94A3B8;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.pwa-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

/* 3. iOS Install Guide Modal */
.ios-pwa-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(9, 26, 56, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  animation: pwaFadeIn 0.25s ease forwards;
}

@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ios-pwa-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #091A38;
  border: 1px solid rgba(18, 42, 107, 0.3);
  border-radius: 24px;
  padding: 24px 22px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  text-align: center;
  animation: pwaSheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pwaSheetUp {
  from { transform: translateY(40px); }
  to { transform: translateY(0); }
}

.ios-pwa-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.ios-pwa-logo {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ios-pwa-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.ios-pwa-subtitle {
  font-size: 0.85rem;
  color: #94A3B8;
}

.ios-pwa-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 22px 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ios-pwa-step {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: #CBD5E1;
}

.ios-pwa-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #122A6B;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ios-pwa-step-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.ios-pwa-done-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  background: #FFFFFF;
  color: #122A6B;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ios-pwa-done-btn:hover {
  background: #E8ECEF;
  color: #091A38;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .pwa-toast {
    left: 50%;
    right: auto;
    bottom: 16px;
    width: calc(100% - 24px);
    padding: 12px 14px;
  }
}
