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

/* Safari/iOS can still render native disclosure markers on summary.
   Hide them for custom-caret summaries only. */
summary.list-none {
  list-style: none;
}

summary.list-none::-webkit-details-marker {
  display: none;
}

summary.list-none::marker {
  content: "";
}

details > summary .collections-caret {
  transition: transform 150ms ease;
}

details[open] > summary .collections-caret {
  transform: rotate(90deg);
}

.collections-system-icon .system-icon-outline {
  display: inline-flex;
}

.collections-system-icon .system-icon-filled {
  display: none;
}

details[open] > summary .collections-system-icon .system-icon-outline {
  display: none;
}

details[open] > summary .collections-system-icon .system-icon-filled {
  display: inline-flex;
}

details[open] > summary .doc-link {
  display: inline-flex;
}

details:not([open]) > .collections-children {
  display: none;
  margin-top: 0;
}

/* Shared subtle hover treatment for editable/read-only note textareas. */
.note-textarea-hover {
  transition: background-color 150ms ease;
}

.note-textarea-hover:hover {
  background-color: #f9fafb;
}

.peer:checked + .review-toggle {
  border-color: #111827;
  background-color: #111827;
}

.peer:checked + .review-toggle .review-toggle__knob {
  transform: translateX(16px);
}

.review-bar-hit::before {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: -14px;
  right: -4px;
  background: transparent;
  pointer-events: auto;
}

.review-bar-slim {
  width: 2px;
}

.sortable-ghost,
.sortable-drag,
.sortable-fallback {
  list-style: none;
  pointer-events: none;
}

li.reorder-dragged {
  opacity: 0.15;
}

li.reorder-drop-before,
li.reorder-drop-after,
li.reorder-drop-child {
  position: relative;
}

li.reorder-drop-before::before,
li.reorder-drop-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(99, 102, 241, 0.9);
  border-radius: 9999px;
}

li.reorder-drop-before::before {
  top: -6px;
}

li.reorder-drop-after::after {
  bottom: -6px;
}

li.reorder-drop-child {
  background: none;
  box-shadow: none;
}

li.reorder-drop-child > div {
  background: rgba(99, 102, 241, 0.06);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
  border-radius: 0.5rem;
}

[data-collections-reorder-target="tree"][data-reorder-dragging="true"] .sortable-ghost {
  display: none;
}

[data-collections-reorder-target="tree"][data-reorder-dragging="true"] button,
[data-collections-reorder-target="tree"][data-reorder-dragging="true"] summary,
[data-collections-reorder-target="tree"][data-reorder-dragging="true"] a {
  pointer-events: none;
}

.app-chrome-wordmark-invert {
  filter: brightness(0) invert(1);
}

.app-chrome-slate {
  border-bottom: 1px solid rgba(17, 24, 39, 0.18);
}

.app-collections-header {
  background: #E0E2E4;
  border-bottom: 1px solid rgba(74, 85, 104, 0.14);
}

.app-page-header-band {
  background: #E0E2E4;
  border-bottom: 1px solid rgba(74, 85, 104, 0.14);
}

.collections-toolbar-search[open] > summary {
  display: none;
}

.collections-toolbar-search[open] ~ .collections-toolbar-secondary {
  display: none;
}
