/*
 * 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.
 *= require theme
 *= require_tree .
 *= require_self
 */

 
 :root {
  --brand-color: rgb(0, 97, 167);
 }
 
.text-badge {
  inset: 50% auto auto auto !important;
}

 #top_nav_bar {
  background-color: var(--brand-color);
  color: white;
 }
 
 #desktop_drawer header {
  background-color: var(--brand-color) !important;
  color: white;
 }

.min-block-size-4-5 {
  min-block-size: 4.5rem;
}

/* Equal height grid items */
.grid > .equal-height {
  display: flex;
  flex-direction: column;
}

.grid > .equal-height > turbo-frame {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid > .equal-height article.border,
.grid > .equal-height turbo-frame > article.border {
  flex: 1;
  margin: 0;
}

/* Ensure turbo frames behave as block elements */
turbo-frame {
  display: block;
}

/* General turbo frame loading states */
turbo-frame[busy] {
  position: relative;
  min-height: 150px;
}

/* Hide original content during loading */
turbo-frame[busy] > * {
  display: none;
}

/* Loading background with text */
turbo-frame[busy]::before {
  content: attr(data-loading-text);
  position: absolute;
  inset: 0;
  /*
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  */
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px; /* Space for spinner */
  color: var(--on-surface-variant);
  font-size: 0.875rem;
  text-align: center;
}

/* Spinner */
turbo-frame[busy]::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -50px; /* Move spinner up */
  margin-left: -18px;
  width: 36px;
  height: 36px;
  border: 3px solid var(--outline-variant);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Optional: Minimal loading state for inline frames */
turbo-frame.inline[busy] {
  min-height: auto;
}

turbo-frame.inline[busy] > * {
  opacity: 0.5;
  display: block;
}

turbo-frame.inline[busy]::before {
  position: static;
  background: none;
  border: none;
  padding: 0.5rem;
}

turbo-frame.inline[busy]::after {
  display: none;
}

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

/* Tag Multiselect Component */
dialog nav.no-space label.checkbox {
  display: block;
  padding: 0.5rem 0;
}

.d-none {
  display: none !important;
}

#desktop_drawer {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
#desktop_drawer::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

/* Sticky header within scrollable nav */
#desktop_drawer header {
  position: sticky;
  top: 0;
  z-index: 10;
}
