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

/* Column highlighting effect */
.column-highlight {
    filter: brightness(0.95);
}

/* Turbo Frame Loading States - Blur + Spinner */
/* Blur content when turbo frame with opt-in class is loading */
turbo-frame.turbo-loading-blur[busy] {
  position: relative;
  pointer-events: none;
}

turbo-frame.turbo-loading-blur[busy] > * {
  filter: blur(2px);
  opacity: 0.6;
  transition: filter 0.2s, opacity 0.2s;
}

/* Centered spinner overlay */
turbo-frame.turbo-loading-blur[busy]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #0891b2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 50;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Hide search field clear button in Chrome/Edge */
input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/* Lexxy rich text editor placeholder color override.
   Lexxy renders placeholders via ::before with color: currentColor + opacity: 0.66,
   which makes the placeholder too dark. We override it to match the standard
   placeholder color (equivalent to Tailwind's text-gray-400). */
:where(.lexxy-editor--empty) .lexxy-editor__content:not(:has(ul, ol))::before {
  color: hsl(211, 10%, 53%);
  opacity: 1;
}