/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* PWA-specific styles for better mobile experience */

/* Support for iOS safe areas (notches, home indicators) */
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

/* Prevent pull-to-refresh on mobile PWA */
body.pwa-standalone {
  overscroll-behavior-y: contain;
}

/* Hide address bar on iOS when running as PWA */
.ios-standalone body {
  padding-top: 0;
}

/* Improve touch targets for mobile */
@media (pointer: coarse) {
  button,
  a,
  input,
  select,
  textarea {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Prevent text size adjustment on orientation change */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Better scrolling on iOS */
* {
  -webkit-overflow-scrolling: touch;
}

/* Prevent highlighting on tap */
* {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Improve button appearance on iOS */
button,
input[type="submit"],
input[type="button"] {
  -webkit-appearance: none;
  appearance: none;
}

/* Full-height layout for PWA */
.pwa-standalone main {
  min-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

/* Hide install button when running as PWA */
.pwa-standalone #pwa-install-button,
.ios-standalone #pwa-install-button {
  display: none !important;
}
