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

/* 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;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 60px; /* Space for spinner */
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  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(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Sidebar scrollbar hidden (content scrolls, chrome stays clean) */
#desktop_drawer {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
#desktop_drawer::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

/* Bot protection - honeypot field styling */
.form-helper {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
