/* ============================================================================
   NARI NIKETAN — PWA (Progressive Web App) UI Styles
   ============================================================================ */

/* Install button in navbar */
.pwa-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #D4AF37 0%, #F0D060 100%);
  color: #1A0A0F;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full, 999px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.pwa-nav-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.55);
}

.pwa-nav-btn span.badge-sparkle {
  display: inline-block;
  animation: pwaSparkle 1.6s infinite ease-in-out;
}

@keyframes pwaSparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(12deg); }
}

/* Floating Bottom Install Prompt Banner */
.pwa-install-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 380px;
  width: calc(100% - 40px);
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 12px 40px rgba(139, 26, 74, 0.22);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 99999;
  transform: translateY(120px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.pwa-install-banner.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.pwa-banner-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(139, 26, 74, 0.15);
}

.pwa-banner-info {
  flex: 1;
  min-width: 0;
}

.pwa-banner-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 0.96rem;
  font-weight: 700;
  color: #8B1A4A;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-desc {
  font-size: 0.78rem;
  color: #6B4C3B;
  line-height: 1.3;
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-btn-install-now {
  background: linear-gradient(135deg, #8B1A4A 0%, #B5265F 100%);
  color: #FFFFFF;
  border: none;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(139, 26, 74, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pwa-btn-install-now:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139, 26, 74, 0.45);
}

.pwa-btn-dismiss {
  background: transparent;
  border: none;
  color: #9B7D70;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 50%;
  transition: color 0.2s ease;
}

.pwa-btn-dismiss:hover {
  color: #1A0A0F;
}

/* iOS Safari Installation Instruction Modal */
.pwa-ios-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 10, 15, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.pwa-ios-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.pwa-ios-modal {
  background: #FFFFFF;
  max-width: 440px;
  width: 100%;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 32px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-ios-modal-overlay.active .pwa-ios-modal {
  transform: translateY(0);
}

.pwa-ios-drag-handle {
  width: 40px;
  height: 4px;
  background: #E0D5D0;
  border-radius: 2px;
  margin: 0 auto 16px;
}

.pwa-ios-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.pwa-ios-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
}

.pwa-ios-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 1.3rem;
  color: #8B1A4A;
  font-weight: 700;
}

.pwa-ios-steps {
  background: #FFF8F0;
  border-radius: 14px;
  padding: 16px;
  text-align: left;
  margin-bottom: 20px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.pwa-ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: #2C1810;
  margin-bottom: 12px;
}

.pwa-ios-step:last-child {
  margin-bottom: 0;
}

.pwa-ios-step-num {
  width: 26px;
  height: 26px;
  background: #8B1A4A;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.pwa-ios-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #E0D5D0;
  font-weight: 600;
  font-size: 0.85rem;
}

.pwa-ios-close-btn {
  background: linear-gradient(135deg, #8B1A4A 0%, #B5265F 100%);
  color: #FFFFFF;
  border: none;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

/* Offline Floating Indicator */
.pwa-network-toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  background: #1A0A0F;
  color: #FFFFFF;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 100001;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.pwa-network-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.pwa-network-toast.offline {
  background: #C62828;
}

.pwa-network-toast.online {
  background: #2E7D32;
}

/* When in standalone mode, adjust top padding for notch devices */
@media all and (display-mode: standalone) {
  .pwa-install-banner,
  .pwa-nav-btn,
  .get-app-section {
    display: none !important;
  }
  body {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (max-width: 600px) {
  .pwa-install-banner {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ============================================================================
   GET THE APP SECTION
   ============================================================================ */

.get-app-section {
  background: linear-gradient(135deg, #1A0A0F 0%, #2D0A1E 50%, #1A0A0F 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.get-app-section::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.get-app-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(139, 26, 74, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.get-app-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 60px;
}

/* Left content */
.get-app-left {
  max-width: 540px;
}

.get-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #D4AF37;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.get-app-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 16px;
}

.get-app-title span {
  background: linear-gradient(90deg, #D4AF37, #F0D060);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.get-app-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.get-app-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.get-app-features li {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Download Buttons */
.get-app-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.get-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: none;
  border-radius: 14px;
  padding: 12px 22px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  min-width: 180px;
}

.get-app-btn-primary {
  background: linear-gradient(135deg, #D4AF37 0%, #F0D060 100%);
  color: #1A0A0F;
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.45);
}

.get-app-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.get-app-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.5);
}

.get-app-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.get-app-btn-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.get-app-btn-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.get-app-btn-small {
  font-size: 0.7rem;
  font-weight: 600;
  opacity: 0.75;
  letter-spacing: 0.04em;
}

.get-app-btn-main {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.get-app-note {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8rem;
}

/* Right: Phone Mockup */
.get-app-right {
  flex-shrink: 0;
}

.get-app-mockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.get-app-phone {
  width: 160px;
  height: 280px;
  background: linear-gradient(160deg, #2D1A30 0%, #1A0A1A 100%);
  border-radius: 32px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: phoneFloat 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.get-app-phone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: rgba(212, 175, 55, 0.4);
  border-radius: 0 0 6px 6px;
}

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.get-app-phone-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.get-app-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(139, 26, 74, 0.5);
}

.get-app-phone-brand {
  color: #F0D060;
  font-family: var(--font-display, 'Playfair Display', serif);
  font-weight: 700;
  font-size: 0.88rem;
}

.get-app-phone-tagline {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.get-app-features-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 200px;
}

.get-app-pill {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #D4AF37;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

/* Responsive */
@media (max-width: 768px) {
  .get-app-section {
    padding: 60px 0;
  }

  .get-app-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .get-app-left {
    max-width: 100%;
  }

  .get-app-features {
    grid-template-columns: 1fr;
    text-align: left;
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
  }

  .get-app-buttons {
    justify-content: center;
  }

  .get-app-right {
    display: none;
  }
}

