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

/* Propshaft serves sibling stylesheets as separate digested assets via
 * `stylesheet_link_tag :app`, so keep this file as the manifest root and
 * avoid relative @import statements that resolve to non-digested URLs.
 */

:root {
  --color-overlay-backdrop: rgba(0, 0, 0, 0.5);
  --color-surface-primary: white;
  --color-surface-primary-dark: #1e293b;
  --color-shadow-soft: rgba(0, 0, 0, 0.12);
  --color-shadow-soft-dark: rgba(0, 0, 0, 0.3);
  --color-drag-target-outline: #60a5fa;
  --color-drag-target-outline-dark: #3b82f6;
  --color-drag-target-bg: #eff6ff;
  --color-drag-target-bg-dark: rgba(37, 99, 235, 0.15);
}

/* Folder drop target highlight during drag */
li[data-drag-target="true"] > div {
  outline: 2px solid var(--color-drag-target-outline);
  outline-offset: -2px;
  border-radius: 6px;
  background-color: var(--color-drag-target-bg);
}

@media (prefers-color-scheme: dark) {
  li[data-drag-target="true"] > div {
    background-color: var(--color-drag-target-bg-dark);
    outline-color: var(--color-drag-target-outline-dark);
  }
}

/* Give expanded folder turbo-frames a minimum height during drag so empty folders are droppable */
body[data-dragging-file] [data-tree-item-target="children"]:not(.hidden) turbo-frame {
  display: block;
  min-height: 2rem;
}
