/*
 * 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.
 *
 * Note: With Propshaft, use separate stylesheet_link_tag in layout instead of @import
 */

/* Turbo loading indicator */
body.turbo-loading {
  cursor: wait;
}

body.turbo-loading::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F7B500 0%, #e6a800 50%, #F7B500 100%);
  background-size: 200% 100%;
  animation: loading-bar 1s ease-in-out infinite;
  z-index: 9999;
}

@keyframes loading-bar {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Highlight active table row when an input is focused */
tr:focus-within {
  background-color: rgba(247, 181, 0, 0.18) !important;
  outline: 2px solid rgba(247, 181, 0, 0.5);
  outline-offset: -2px;
}

/* Hide number input spinners globally */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
