/* ============================================================
   PWA Custom Styles — iOS Safari / iPhone optimisations
   ============================================================ */

/* ── Install Button ── */
#pwaInstallBtn {
  background: #10b981 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5) !important;
}
#pwaInstallBtn:active,
#pwaInstallBtn:focus {
  background: #059669 !important;
}

/* ── Safe-area insets for iPhone notch / Dynamic Island / home indicator ── */
body {
  padding-top:    env(safe-area-inset-top,    0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left:   env(safe-area-inset-left,   0px);
  padding-right:  env(safe-area-inset-right,  0px);
}

/* When running as installed PWA (standalone mode) */
@media all and (display-mode: standalone) {
  body {
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 16px);
  }
  .browser-only { display: none !important; }
}

/* ── Prevent iOS tap highlight / callout ── */
* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

/* Allow text selection where needed */
input, textarea, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}

/* ── Smooth scrolling on iOS ── */
.dashboard-container,
.section-scroll,
#tasksListArea {
  -webkit-overflow-scrolling: touch;
  overflow: visible !important; /* Allow the body to scroll everything */
}

/* ── Fixed bottom bars respect home indicator ── */
.bottom-bar,
.fixed-footer,
[style*="position: fixed"][style*="bottom"] {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Prevent double-tap zoom on buttons ── */
button,
a,
[role="button"] {
  touch-action: manipulation;
}

/* ── Prevent rubber-band scroll on body ── */
html {
  height: 100%;
}
body {
  min-height: 100%;
  position: relative;
  width: 100%;
}
