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

/* Utilities the host views use that the niki gem's pre-built Tailwind (engine.css)
   doesn't emit — the gem's build scans the gem's own files, not this repo's.
   Values pinned to tailwindcss 4.2.2. */
.h-7 { height: 1.75rem; }
.h-9 { height: 2.25rem; }
.min-w-56 { min-width: 14rem; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.w-7 { width: 1.75rem; }
.w-9 { width: 2.25rem; }
.p-8 { padding: 2rem; }
.py-12 { padding-block: 3rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.shadow { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.pr-9 { padding-right: 2.25rem; }
.text-indigo-600 { color: oklch(51.1% 0.262 276.966); }
.bg-indigo-600 { background-color: oklch(51.1% 0.262 276.966); }
@media (hover: hover) {
  .hover\:bg-indigo-700:hover { background-color: oklch(45.8% 0.243 274.033); }
  .hover\:bg-gray-50:hover { background-color: oklch(98.5% 0.002 247.839); }
}
.focus\:ring-indigo-500:focus { --tw-ring-color: oklch(69.5% 0.212 277.575); }
/* The consent org select: hide the native chrome and draw the house chevron. */
.org-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3e%3cpath d='M19 9l-7 7-7-7' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25rem 1.25rem;
}

/* Dark-mode utilities the host views use that the niki gem's pre-built
   Tailwind (engine.css) does not emit: each of these seven exists only in host
   files, so the gem's build (which scans the gem's own tree) can never
   generate them. Every other dark: utility the host uses is now emitted by
   engine.css since the niki ref bump to the dark-mode engine PR. Values
   pinned to tailwindcss 4.2.2.
   Scoped to the .dark class the inline bootstrap in the layouts toggles on
   <html>; engine.css sets html.dark's color-scheme so browser chrome
   (scrollbars, form controls, autofill) follows the theme. The hover rules
   carry the engine's @media (hover: hover) guard so a tap on a touch device
   doesn't leave the hover color stuck. */
.dark .dark\:bg-gray-700 { background-color: oklch(37.3% 0.034 259.733); }
.dark .dark\:text-red-400 { color: oklch(70.4% 0.191 22.216); }
.dark .dark\:text-indigo-400 { color: oklch(67.3% 0.182 276.935); }
.dark .dark\:block { display: block; }
.dark .dark\:hidden { display: none; }
@media (hover: hover) {
  .dark .dark\:hover\:text-red-300:hover { color: oklch(80.8% 0.114 19.571); }
  .dark .dark\:hover\:text-blue-300:hover { color: oklch(80.9% 0.105 251.813); }
}

.folder-tree-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.folder-tree-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6rem 4rem 2rem;
}

.folder-direct-pages { text-align: right; }

@media (min-width: 48rem) {
  .folder-tree-columns { grid-template-columns: minmax(0, 1fr) 10rem 4rem 2rem; }
}

.folder-danger-zone {
  --danger-border: #fecaca;
  --danger-text: #991b1b;
  --danger-hover: #fef2f2;
  --dialog-background: #fff;
  --dialog-text: #111827;
  --dialog-border: #d1d5db;
  --dialog-hover: #f3f4f6;
  max-width: 26rem;
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid var(--danger-border);
  border-radius: 0.5rem;
  color: var(--danger-text);
}

.dark .folder-danger-zone {
  --danger-border: #7f1d1d;
  --danger-text: #fca5a5;
  --danger-hover: #450a0a;
  --dialog-background: #111827;
  --dialog-text: #f3f4f6;
  --dialog-border: #4b5563;
  --dialog-hover: #1f2937;
}

.folder-danger-group + .folder-danger-group {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--danger-border);
}

.folder-danger-group > summary {
  padding-block: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.folder-unpublish-clients { margin-top: 0.5rem; }
.folder-unpublish-clients > li { padding-block: 0.375rem; }

.folder-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--dialog-text);
  font-size: 0.875rem;
}

.folder-danger-row > span { overflow-wrap: anywhere; }
.folder-danger-row > :is(button, form) { flex-shrink: 0; }

.folder-danger-button {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--danger-border);
  border-radius: 0.375rem;
  color: var(--danger-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.folder-danger-button:hover { background: var(--danger-hover); }
.folder-danger-button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.folder-danger-button--cancel { color: inherit; border-color: var(--dialog-border); }
.folder-danger-button--cancel:hover { background: var(--dialog-hover); }
.folder-danger-button--confirm { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.folder-danger-button--confirm:hover { background: #991b1b; }
.folder-danger-button--confirm:focus-visible { outline-color: var(--danger-text); }

.folder-unpublish-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(28rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: auto;
  padding: 1.25rem;
  border: 1px solid var(--dialog-border);
  border-radius: 0.5rem;
  background: var(--dialog-background);
  color: var(--dialog-text);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.25);
}

.folder-unpublish-dialog::backdrop { background: rgb(0 0 0 / 0.55); }

/* Folder chip options contain paths, so let their labels wrap inside the panel. */
[data-chip-details-url-value$="/folder_options"] [data-chip-details-target="options"] button > span {
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (min-width: 48rem) {
  [data-chip-details-url-value$="/folder_options"] > div {
    max-width: 28rem;
  }
}

.clockwork-history-panel {
  overflow-x: auto;
}

.prose .clockwork-history-panel table {
  margin-block: 0;
}

.prose .clockwork-run-action a {
  text-decoration: none;
}
