/*
 * 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.
 */

/* =============================================
   Native App Styles (Hotwire Native / Turbo Native)
   ============================================= */

/* Safe area handling for iOS notch and home indicator */
.native-app {
  /* Prevent overscroll bounce */
  overscroll-behavior: none;
}

/* Safe area padding for bottom nav */
.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* iOS-style safe areas */
.ios-app body {
  padding-top: env(safe-area-inset-top);
}

/* Hide web navigation in native apps */
.native-app .web-nav {
  display: none !important;
}

/* Disable text selection in native apps for more native feel */
.native-app .no-select {
  -webkit-user-select: none;
  user-select: none;
}

/* Native-style active states */
.native-app button:active,
.native-app a:active {
  opacity: 0.7;
  transition: opacity 0.1s ease;
}

/* Smoother scrolling for native apps */
.native-app {
  -webkit-overflow-scrolling: touch;
}

/* Hide scrollbars in native apps */
.native-app ::-webkit-scrollbar {
  display: none;
}

.native-app * {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Tab bar active state indicator */
.native-app nav a.active {
  position: relative;
}

.native-app nav a.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background-color: currentColor;
  border-radius: 1px;
}

/* Prevent zoom on input focus in iOS */
.native-app input,
.native-app select,
.native-app textarea {
  font-size: 16px;
}

/* Native-style cards */
.native-app .card {
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Improve tap targets for mobile */
.native-app .tap-target {
  min-height: 44px;
  min-width: 44px;
}

/* =============================================
   Pull-to-Refresh Styles
   ============================================= */

/* Spinner animation when refreshing */
[data-pull-to-refresh-target="indicator"].refreshing [data-spinner] {
  animation: spin 1s linear infinite;
}

/* Ready state - slightly larger indicator */
[data-pull-to-refresh-target="indicator"].ready [data-spinner] {
  color: #16a34a; /* green-600 */
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* =============================================
   Turbo Progress Bar
   ============================================= */

/* Style the Turbo progress bar */
.turbo-progress-bar {
  height: 3px;
  background: linear-gradient(to right, #6366f1, #8b5cf6);
}
