/* Editor panel (Left Workbench Column) */
.panel-edit {
  border-right: 1px solid var(--border-workbench, #232736);
  background: var(--bg-surface-workbench, #0e1017);
}

.panel-workbench {
  background: var(--bg-surface-workbench, #0e1017);
}

.panel-workbench .editor-header-bar {
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-canvas {
  background: var(--bg-core);
}

/* Quick Add Toolbar */
.quick-add-bar {
  padding: 8px 0px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.quick-add-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-width: 0;
  padding-right: 13px !important;
}

.quick-add-buttons::-webkit-scrollbar {
  display: none;
}

.btn-quick {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 11.5px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-quick:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-focus);
  color: var(--text-primary) !important;
}

.btn-quick-day {
  margin-left: 13px !important;
}

/* Save to Account button in the quick-add bar */
.btn-save-cloud {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--accent-lodging, #2563eb);
  color: #ffffff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-save-cloud:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-save-cloud svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.accent-flight {
  color: var(--accent-flight);
}

.accent-activity {
  color: var(--accent-activity);
}

.accent-lodging {
  color: var(--accent-lodging);
}

.accent-car {
  color: var(--accent-car);
}

.accent-dining {
  color: var(--accent-dining);
}

.accent-sandbox {
  color: var(--accent-sandbox);
}

/* Textarea Editor */
.textarea-container {
  flex-grow: 1;
  padding: 5px 10px 0;
  display: flex;
  min-height: 120px;
  transition: flex-grow 0.3s cubic-bezier(0.16, 1, 0.3, 1), height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

textarea#editor {
  width: 100%;
  height: 100%;
  background: var(--editor-textarea-bg, #ffffff);
  border: 1.5px solid var(--editor-textarea-border, var(--border-color));
  border-radius: 8px;
  outline: none;
  resize: none;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, 'Courier New', monospace;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.7;
  tab-size: 4;
  padding: 14px 16px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

textarea#editor:focus {
  border-color: var(--editor-textarea-border-focus, var(--border-focus, #4a90d9));
  box-shadow: 0 0 0 3px var(--editor-textarea-focus-ring, rgba(74, 144, 217, 0.12));
}

/* Editor Reference Footer */
.editor-footer {
  position: relative;
  padding: 6px 16px 10px;
  background: transparent;
  transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.help-details {
  width: 100%;
  display: block;
}

.help-details summary {
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  outline: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition-smooth);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
}

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

.help-details summary::before {
  content: '▸';
  font-size: 9px;
  opacity: 0.75;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.help-details[open]:not(.closing) summary::before {
  transform: rotate(90deg);
}

.help-details.closing summary::before {
  transform: rotate(0deg);
}

.help-details summary:hover {
  color: var(--text-primary);
}

.btn-copy-text {
  position: absolute;
  top: 6px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--border-radius-sm, 4px);
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
  line-height: 1.2;
  height: 26px;
  box-sizing: border-box;
}

.btn-copy-text:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus, var(--text-secondary));
  color: var(--text-primary);
}

.btn-copy-text:active {
  transform: translateY(1px);
}

.btn-copy-text.copied {
  color: var(--accent-green, #10b981);
  border-color: var(--accent-green, #10b981);
}

.help-content {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-md);
  border: 1px solid transparent;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding: 0 12px;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease,
    margin-top 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease;
}

.help-details[open]:not(.closing) .help-content {
  max-height: 400px;
  opacity: 1;
  margin-top: 6px;
  padding: 10px 12px;
  border-color: var(--border-color);
  /* Safety net: max-height above is sized for today's content so the open/
     close transition can animate at all (transitions need a fixed target,
     not "auto"). If this list grows again later and outgrows 400px, scroll
     instead of silently clipping content like the link at the bottom. */
  overflow-y: auto;
}

.help-details.closing .help-content {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding: 0 12px;
  border-color: transparent;
}

.help-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-content li {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.help-content li:last-child {
  margin-bottom: 0;
}

.help-content code {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, 'Courier New', monospace !important;
  font-size: 10.5px;
  letter-spacing: -0.5px;
  background: rgb(from var(--bg-surface) r g b / 0.5);
  border: 1px solid var(--border-color);
  padding: 0.06rem 0.2rem;
  border-radius: var(--radius-sm);
}



.help-full-docs-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-flight, #2563eb);
  text-decoration: none;
}

.help-full-docs-link:hover {
  text-decoration: underline;
}

/* Editor Header Toolbar redesign */
.editor-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 16, 19, 0.95);
  border-bottom: 1px solid var(--border-color);
  min-height: 56px;
  box-sizing: border-box;
  container-type: inline-size;
  container-name: editor-header;
}

.editor-tabs-pill {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.editor-tabs-pill .tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.editor-tabs-pill .tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.editor-tabs-pill .tab-btn:active {
  transform: scale(0.96);
}

.editor-tabs-pill .tab-btn.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.editor-tabs-pill .tab-btn svg {
  opacity: 0.6;
  transition: opacity 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.editor-tabs-pill .tab-btn.active svg {
  opacity: 0.95;
  color: var(--accent-flight);
  transform: scale(1.05);
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
}

/* Discreet sync status badge (hidden when saved) */
.editor-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.editor-sync-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.editor-sync-badge.hidden {
  display: none !important;
}

.editor-sync-badge .sync-badge-text {
  font-size: 11px;
  line-height: 1;
}

/* Redesign secondary buttons in actions to be sleeker */
.editor-actions .btn-secondary {
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-focus);
}

/* Container query responsive controls:
   Because the editor pane is a fractional column inside a CSS grid (or full-width on mobile),
   container queries on .editor-header-bar respond accurately to the toolbar's actual width
   regardless of screen resolution or 3-column splits. Viewport media query fallbacks ensure
   graceful behavior across all environments. */

/* Stage 1: Drop "Builder" / "Editor" word suffixes from mode tabs first */
@container editor-header (max-width: 620px) {
  .editor-header-bar .long-label {
    display: none;
  }
}

/* Stage 2: When space is further constrained, collapse action labels to icon-only */
@container editor-header (max-width: 530px) {
  .editor-header-bar .btn-text {
    display: none;
  }

  .editor-header-bar .btn-icon {
    padding: 0 8px;
  }

  .editor-actions {
    gap: 4px;
  }
}

/* Stage 3: Extra compact toolbar (phone or tight panes) - tighten tab padding and alt badges */
@container editor-header (max-width: 380px) {
  .editor-header-bar {
    padding: 8px 10px;
    gap: 6px;
  }

  .editor-tabs-pill .tab-btn {
    padding: 6px 8px;
    gap: 4px;
    font-size: 11px;
  }

  .editor-actions .btn-secondary {
    padding: 0 6px;
  }

  .editor-header-bar .alt-hint-badge {
    display: none !important;
  }
}

/* Viewport media query fallbacks for environments where container queries aren't evaluated */
@media (max-width: 1200px) {
  .editor-header-bar .long-label {
    display: none;
  }
}

@media (max-width: 1250px) {
  .editor-header-bar .btn-text {
    display: none;
  }

  .editor-header-bar .btn-icon {
    padding: 0 8px;
  }
}

@media (max-width: 768px) {
  .editor-header-bar {
    padding: 8px 12px;
  }

  .visual-outline-wrapper {
    padding: 20px 8px !important;
  }
}

/* The Slider track */
.slider {
  position: relative;
  width: 28px;
  height: 16px;
  background-color: var(--bg-surface-elevated, #24262b);
  border: 1px solid var(--border-color, #3f444e);
  border-radius: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* The Slider knob */
.slider:before {
  content: "";
  position: absolute;
  height: 10px;
  width: 10px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-secondary, #a0a5b1);
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Checked state transitions */
input:checked+.slider {
  background-color: rgba(0, 229, 255, 0.1);
  border-color: var(--accent-flight);
}

input:checked+.slider:before {
  transform: translateX(12px);
  background-color: var(--accent-flight);
  box-shadow: 0 0 4px rgba(0, 229, 255, 0.5);
}

/* Mobile Edit overrides */
@media (max-width: 768px) {
  .panel-edit {
    border-right: none;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .map-toggle-group {
    display: none !important;
  }

  #pane-code.tab-pane.active {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .textarea-container {
    flex: 1 1 auto !important;
    min-height: 220px !important;
    padding-bottom: 0px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  textarea#editor {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 200px !important;
    border-radius: 6px;
    overflow-y: auto !important;
  }

  .editor-footer {
    flex-shrink: 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

/* Constrain editor workspace wrapper inside grid layout */
#editor-workspace-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  #editor-workspace-wrapper {
    display: contents;
  }
}

/* ── Contextual Search Drawer ("Forking" Experience) ─────────────────────── */
.places-search-wrapper {
  position: relative;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-workbench, transparent);
  box-sizing: border-box;
}

.places-search-wrapper.contextual-drawer {
  max-height: 80px;
  opacity: 1;
  overflow: visible;
  transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, padding 0.25s ease, border-color 0.2s ease;
}

.places-search-wrapper.contextual-drawer.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: 1px solid transparent;
  overflow: hidden;
  pointer-events: none;
}

.places-search-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}

.btn-close-search-drawer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.btn-places-fetch-url {
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid var(--accent-flight, #00e5ff);
  color: var(--accent-flight, #00e5ff);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-places-fetch-url:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.25);
}

.btn-places-fetch-url:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-close-search-drawer:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.places-search-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.places-search-input-row:focus-within {
  border-color: var(--active-category-accent, var(--accent-flight));
  box-shadow: 0 0 0 2px var(--active-category-glow, rgba(0, 229, 255, 0.15));
}

.places-search-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
  opacity: 0.6;
}

.places-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 0;
  min-width: 0;
}

@media (max-width: 768px) {

  /* iOS Safari auto-zooms the page on focus for any input under 16px. */
  .places-search-input {
    font-size: 16px;
  }
}

.places-search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Override the wrapper ring when the inner search text box is active */
.places-search-wrapper:focus-within {
  border-color: var(--active-category-accent, var(--accent-flight));
  box-shadow: 0 0 0 2px var(--active-category-glow, rgba(0, 229, 255, 0.15));
}

/* Hide the native search clear button */
.places-search-input::-webkit-search-cancel-button {
  display: none;
}

.places-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  min-width: 320px;
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-surface, #161b22);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md, 8px);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  z-index: 9999;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.places-search-wrapper .places-search-results {
  top: calc(100% - 1px);
  left: 16px;
  right: 16px;
  width: auto;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

.places-search-results::-webkit-scrollbar {
  width: 6px;
}

.places-search-results::-webkit-scrollbar-track {
  background: transparent;
}

.places-search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}

.places-search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.places-search-results.visible {
  display: block;
}

/* Ensure parent forms and outline items never clip child dropdown popovers */
.visual-inline-form,
.outline-item,
.outline-item.editing {
  overflow: visible !important;
}

.places-result-item {
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.12s ease;
}

.places-result-item:hover,
.places-result-item.selected {
  background: rgba(255, 255, 255, 0.06);
}

.places-result-item.selected {
  border-left: 2px solid var(--accent, #00f2fe);
}

.places-result-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: normal;
  line-height: 1.3;
  word-break: break-word;
}

.places-result-address {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: normal;
  line-height: 1.3;
  word-break: break-word;
}

.places-result-loading,
.places-result-empty {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
  list-style: none;
}

.places-free-text-item,
.places-show-more-item {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
  padding: 8px 14px;
}

.places-show-more-item {
  text-align: center;
  font-style: normal;
}

/* Insert-action pill row inside popover */
.places-insert-actions {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface-elevated, rgba(255, 255, 255, 0.04));
  overflow-x: auto;
  scrollbar-width: none;
}

.places-insert-actions::-webkit-scrollbar {
  display: none;
}

.places-insert-actions.visible {
  display: flex;
}

.deck-item-map-link {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
}

/* ── Collapsible Day Sections ──────────────────────────────────────────────── */
.outline-day-header {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-outline-collapse-toggle {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  margin-right: 4px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-outline-collapse-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.btn-outline-collapse-toggle .chevron-icon {
  transition: transform 0.2s ease-in-out;
  transform: rotate(0deg);
}

/* Collapsed State Styles */
.outline-day-group[data-collapsed="true"] .btn-outline-collapse-toggle .chevron-icon {
  transform: rotate(-90deg);
}

.outline-day-group[data-collapsed="true"] .outline-day-header {
  border-bottom-color: transparent !important;
  padding-bottom: 0;
}

.outline-day-group[data-collapsed="true"] {
  gap: 0;
  max-height: 50px;
}

/* Outline day items — max-height + opacity collapse
   The grid-template-rows trick (used in timeline.css) needs a single
   wrapper child to work correctly. Since .outline-day-items has multiple
   direct children (event rows), max-height + overflow:hidden is the
   appropriate approach. The opacity fade at 180ms masks the non-linear
   height easing. A generous max-height of 3000px handles any realistic
   day group without clipping. */
.outline-day-items {
  overflow: hidden;
  max-height: 3000px;
  opacity: 1;
  transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.18s ease;
}

.outline-day-group[data-collapsed="true"] .outline-day-items {
  /* .outline-day-items carries its own min-height: 30px (below) so it
     doesn't collapse to nothing while empty/mid-drag. min-height wins over
     max-height whenever min exceeds max (per spec), so without zeroing it
     here that 30px floor silently defeats the max-height: 0 collapse below
     — this held the collapsed group open by a floating, invisible (opacity:
     0) 30px gap the whole time. */
  min-height: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Also hide the add-event button during collapse */
.outline-day-group[data-collapsed="true"] .btn-outline-add-event {
  display: none;
}

.outline-day-group[data-collapsed="true"] .outline-day-actions {
  display: none;
}

.outline-day-group[data-collapsed="true"] .outline-day-title-col {
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

/* Hover state is carried by .btn-quick itself; the label must not keep a
   theme's resting label color once the button background flips. */
.btn-quick:hover span {
  color: inherit !important;
}