/* ==========================================================
   ISSB Exam Preparation — iPhone (iOS Safari) Standalone PWA Polish
   ========================================================== */

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

/* Native iPhone Notch / Dynamic Island & Home Indicator Safe Areas */
@media all and (display-mode: standalone) {
  body {
    overscroll-behavior-y: none;
    -webkit-touch-callout: none;
  }
  .topbar {
    padding-top: env(safe-area-inset-top);
  }
  .floating-dock {
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  }
  body.has-mobile-dock {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }
}

/* Prevent accidental zoom on iOS input focus (requires >= 16px on touch devices) */
@media (max-width: 820px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Sleek iOS / PWA Install Bottom Sheet */
@keyframes pwaSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.pwa-install-banner {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  max-width: 440px;
  margin: 0 auto;
  z-index: 220;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid #fecdd3;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 18px 42px rgba(28, 25, 23, 0.22);
  animation: pwaSlideUp 0.3s ease;
  color: #1c1917;
}
body:not(.has-mobile-dock) .pwa-install-banner {
  bottom: calc(18px + env(safe-area-inset-bottom));
}

.pwa-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pwa-banner-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pwa-banner-brand img {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.22);
}
.pwa-close-btn {
  background: #faf7f2;
  border: 1px solid #f0e8df;
  color: #78716c;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.pwa-ios-steps {
  background: #fffdf9;
  border: 1px solid #fde68a;
  border-radius: 13px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #292524;
  display: grid;
  gap: 6px;
}
.pwa-ios-step-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pwa-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e11d48;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.pwa-inline-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  background: #eef2ff;
  color: #2563eb;
  padding: 2px 5px;
  border-radius: 6px;
  margin: 0 2px;
}
