/*
 * Record window component authority.
 * Geometry, dragging and resize edges belong to record-workspace.css. This file
 * owns the window's chrome, actions and task header in every theme and width.
 * Keep component changes here instead of adding another theme override.
 */

.record-action-label-short {
  display: none;
}

.record-window {
  --record-control-height: 40px;
  --record-chrome-surface: var(--surface-2, var(--surface));
  --record-focus: var(--primary, var(--brand));
  --record-header-max: max(100px, min(360px, calc(var(--rw-height, 720px) - 220px), calc(100dvh - 240px)));
  grid-template-rows: 52px minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.18), 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.record-window.is-active {
  border-color: color-mix(in srgb, var(--record-focus) 38%, var(--line));
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.22), 0 6px 20px rgba(15, 23, 42, 0.1);
}

.record-window.is-maximized {
  border-radius: 12px;
}

.record-window-titlebar {
  min-width: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--record-chrome-surface);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.is-record-window-dragging .record-window-titlebar {
  cursor: grabbing;
}

.record-window-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--module-color, var(--brand)) 18%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--module-color, var(--brand)) 8%, var(--surface));
  color: var(--module-color, var(--brand));
}

.record-window-mark .icon {
  width: 17px;
  height: 17px;
}

.record-window-title {
  min-width: 0;
  display: grid;
  gap: 3px;
  line-height: 1.2;
}

.record-window-title small {
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.record-window-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-window-controls {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
}

.layout.os-layout-v10 .record-window :is(.record-window-controls, .record-window-actionbar) .btn {
  min-height: var(--record-control-height);
  height: auto;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}

.layout.os-layout-v10 .record-window .record-window-controls .btn {
  width: var(--record-control-height);
  min-width: var(--record-control-height);
  height: var(--record-control-height);
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.layout.os-layout-v10 .record-window .record-window-controls .btn:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.layout.os-layout-v10 .record-window .record-window-controls .btn.is-close:hover {
  border-color: color-mix(in srgb, var(--danger, #dc2626) 24%, var(--line));
  background: color-mix(in srgb, var(--danger, #dc2626) 8%, var(--surface));
  color: var(--danger, #dc2626);
}

.layout.os-layout-v10 .record-window :is(.record-window-controls, .record-window-actionbar) :is(button, a, summary):focus-visible {
  outline: 2px solid var(--record-focus);
  outline-offset: 2px;
}

.record-window-actionbar {
  position: relative;
  /* Above record headers, below the resize handles (z-index: 12). */
  z-index: 11;
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  background: var(--record-chrome-surface);
}

.record-window-save-state {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.record-window-save-state span {
  overflow-wrap: anywhere;
}

.record-window-save-state .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--success, #16805b);
}

.record-window.has-unsaved .record-window-save-state .icon {
  color: var(--record-focus);
}

.record-window.is-readonly .record-window-save-state .icon {
  color: var(--muted);
}

.record-window-save-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.layout.os-layout-v10 .record-window .record-window-save-actions .btn-primary {
  min-width: 88px;
  border-color: var(--record-focus);
  background: var(--record-focus);
  color: #fff;
  box-shadow: none;
}

.layout.os-layout-v10 .record-window .record-window-save-actions .btn-primary:hover:not(:disabled) {
  filter: brightness(0.95);
}

.layout.os-layout-v10 .record-window .record-window-save-actions .btn:disabled {
  cursor: default;
  opacity: 0.5;
}

.record-window-more {
  position: relative;
  min-width: 0;
  justify-self: start;
}

.record-window-more > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
}

.record-window-more > summary::-webkit-details-marker {
  display: none;
}

.layout.os-layout-v10 .record-window-more[open] > summary {
  border-color: var(--record-focus);
  background: var(--surface);
  color: var(--record-focus);
}

.record-window-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: 240px;
  max-width: calc(100vw - 40px);
  max-height: min(320px, calc(var(--rw-height, 600px) - 140px), calc(100dvh - 180px));
  display: grid;
  gap: 4px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
  overscroll-behavior: contain;
}

.layout.os-layout-v10 .record-window .record-window-more-menu .btn {
  width: 100%;
  min-height: 42px;
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  text-align: left;
  white-space: normal;
  box-shadow: none;
}

.layout.os-layout-v10 .record-window .record-window-more-menu .btn:hover:not(:disabled) {
  background: var(--surface-2, var(--surface));
}

.layout.os-layout-v10 .record-window .record-window-more-menu [data-action="permanent-delete"] {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  color: var(--danger, #dc2626);
}

.layout.os-layout-v10 .record-window .record-window-more-menu [data-action="permanent-delete"]:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger, #dc2626) 8%, var(--surface));
}

html[data-theme="dark"] .record-window {
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .record-window.is-active {
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.62);
}

html[data-theme="dark"] .layout.os-layout-v10 .record-window .record-window-save-actions .btn-primary {
  color: #07152e;
}

@container (max-width: 620px) {
  .record-window-actionbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 9px 12px;
  }

  .record-window-save-state {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .record-window-more-menu {
    right: auto;
    left: 0;
  }

  .record-window-titlebar {
    gap: 8px;
    padding-left: 10px;
  }
}

@media (max-width: 640px), (pointer: coarse) {
  .record-window {
    --record-control-height: 44px;
  }
}

@media (max-width: 900px) {
  .record-window-controls > a {
    display: none;
  }
}

@media (max-width: 640px) {
  .record-window {
    grid-template-rows: 56px minmax(0, 1fr) auto;
    border-radius: 12px;
  }

  .record-window-titlebar {
    min-height: 56px;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 6px 6px 6px 10px;
    cursor: default;
    touch-action: manipulation;
  }

  .record-window-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  .record-window-controls [data-action="record-window-maximize"] {
    display: none;
  }

  .record-window-actionbar {
    padding-bottom: calc(9px + env(safe-area-inset-bottom));
  }

  .layout.os-layout-v10 .record-window .record-window-save-actions .btn {
    padding-inline: 12px;
  }
}

/* Generic record details use a shallower heading and tab rail. */
.record-window:not(.record-window-task) .record-window-detail > .panel-header {
  gap: 8px;
  padding: 9px 12px 7px;
}

.record-window:not(.record-window-task) .record-window-detail > .panel-header h2 {
  font-size: clamp(17px, 2.4cqw, 22px);
  line-height: 1.15;
}

.record-window:not(.record-window-task) .record-window-detail > .panel-header .row-actions {
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.record-window:not(.record-window-task) .record-window-detail > .panel-header .row-actions::-webkit-scrollbar {
  display: none;
}

.record-window:not(.record-window-task) .record-window-detail > .panel-header .row-actions .btn {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 5px 9px;
}

.record-window:not(.record-window-task) .record-window-detail > .tab-row {
  min-height: 34px;
  padding: 0 10px;
}

.record-window:not(.record-window-task) .record-window-detail > .tab-row .tab {
  min-height: 34px;
  height: 34px;
  padding-inline: 9px;
  font-size: 10px;
}

.record-window:not(.record-window-task) .record-window-detail > .panel-body {
  padding: 10px 12px 14px;
}

/* Task windows: one compact command header and one dominant content viewport. */
.record-window-task .record-window-detail {
  overflow: hidden;
}

.record-window-task .task-detail-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.record-window-task .task-detail-sticky-head {
  position: relative;
  top: auto;
  min-width: 0;
  /* Small resized windows retain a scrollable content area. */
  max-height: var(--record-header-max) !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 40px 36px;
  gap: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 96%, var(--module-soft, transparent));
  box-shadow: none;
}

.record-window-task .task-detail-hero {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  height: 88px;
  min-height: 0;
  max-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  padding: 8px 12px 7px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--module-color, var(--brand)) 8%, transparent), transparent 58%),
    var(--surface);
}

.record-window-task .task-detail-hero > div:first-child {
  min-width: 0;
}

.record-window-task .task-type-label {
  display: block;
  margin-bottom: 1px;
  font-size: 9px;
  letter-spacing: 0.055em;
}

.record-window-task .task-detail-hero h2 {
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-window-task .task-detail-meta-line {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 0 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.record-window-task .task-detail-meta-line::-webkit-scrollbar {
  display: none;
}

.record-window-task .task-detail-meta-line > span {
  min-width: max-content;
  min-height: 21px;
  flex: 0 0 auto;
  gap: 4px;
  padding: 2px 6px;
  font-size: 10px;
}

.record-window-task .task-detail-meta-line :is(svg, .icon) {
  width: 12px;
  height: 12px;
}

.record-window-task .task-detail-meta-line .avatar {
  width: 16px;
  height: 16px;
}

.record-window-task .task-detail-hero .badge-row {
  min-width: 0;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.record-window-task .task-detail-hero .badge-row::-webkit-scrollbar {
  display: none;
}

.record-window-task .task-detail-hero .badge-row > * {
  flex: 0 0 auto;
  min-height: 19px;
  padding-block: 2px;
  font-size: 9px;
}

.record-window-task .task-detail-meter {
  width: 150px;
  min-width: 0;
  align-self: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 8px;
  padding: 7px 9px;
  border-radius: 10px;
}

.record-window-task .task-detail-meter strong {
  grid-row: 1 / 3;
  font-size: 20px;
  line-height: 1;
}

.record-window-task .task-detail-meter > span {
  align-self: end;
  font-size: 9px;
}

.record-window-task .task-detail-meter .task-progress-line {
  align-self: start;
  height: 4px;
}

.record-window-task .task-detail-actions {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  height: 40px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  padding: 4px 6px 4px 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.record-window-task .task-detail-actions::-webkit-scrollbar {
  display: none;
}

.record-window-task .task-detail-actions .btn {
  min-width: max-content;
  min-height: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 5px 9px;
  font-size: 10px;
}

.record-window-task .task-detail-context {
  grid-column: 2;
  grid-row: 2;
  width: auto;
  max-width: 300px;
  height: 40px;
  max-height: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px 4px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.record-window-task .task-detail-context::-webkit-scrollbar {
  display: none;
}

.record-window-task .task-detail-context .key-pill {
  min-width: 108px;
  min-height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 4px 7px;
  border-radius: 8px;
}

.record-window-task .task-detail-context .key-pill :is(small, strong) {
  display: block;
  margin: 0;
  font-size: 9px;
  line-height: 1.1;
  white-space: nowrap;
}

.task-detail-tab-row > .task-detail-tabs-scroller {
  display: flex;
  flex: 1 1 0%;
  min-width: 0;
  gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.task-detail-tabs-scroller::-webkit-scrollbar {
  display: none;
}

.record-window-task .task-detail-tab-row {
  grid-column: 1 / -1;
  grid-row: 3;
  width: 100%;
  min-height: 36px;
  height: 36px;
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 0 8px;
  overflow: clip;
  scrollbar-width: none;
}

.record-window-task .task-detail-tab-row::-webkit-scrollbar {
  display: none;
}

.record-window-task .task-detail-tab-row .tab {
  min-height: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding-inline: 8px;
  font-size: 10px;
}

.record-window-task .task-detail-header-toggle {
  position: static;
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 28px;
  height: 28px;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 3px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--module-color, var(--brand)) 22%, var(--line));
  border-radius: 7px;
  background: var(--surface);
  color: var(--module-color, var(--brand));
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.record-window-task .task-detail-header-toggle .icon {
  width: 12px;
  height: 12px;
  transition: transform 160ms ease;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-header-toggle .icon {
  transform: rotate(180deg);
}

.record-window-task .task-detail-shell > .panel-body {
  min-height: 0;
  max-height: none;
  padding: 10px 12px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.record-window-task .task-detail-shell > .panel-body > .panel-header:first-of-type {
  position: sticky;
  top: -10px;
  z-index: 3;
  min-height: 46px;
  align-items: center;
  padding: 8px 0;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(12px);
}

.record-window-task .task-detail-shell > .panel-body > .panel-header:first-of-type h2 {
  font-size: 18px;
}

.record-window-task .task-detail-shell > .panel-body > .panel-header:first-of-type .btn {
  min-height: 32px;
  height: 32px;
  padding: 5px 9px;
}

.record-window-task .file-row {
  min-height: 42px;
  padding: 7px 2px;
}

/* Expanded is intentional and reversible: show richer context without trapping content. */
.record-window-task .task-detail-shell.is-header-expanded .task-detail-sticky-head {
  grid-template-rows: auto minmax(52px, auto) 38px;
  max-height: var(--record-header-max) !important;
  overflow-y: auto;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-hero {
  grid-template-columns: minmax(0, 1fr) 112px;
  height: auto;
  min-height: 128px;
  max-height: none;
  padding: 12px;
  overflow: visible;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-hero h2 {
  margin: 2px 0 6px;
  overflow: hidden;
  font-size: 22px;
  line-height: 1.16;
  text-overflow: clip;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-meta-line {
  flex-wrap: wrap;
  overflow: visible;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-meter {
  width: 112px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: 5px;
  padding: 10px;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-meter strong {
  grid-row: auto;
  font-size: 25px;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-actions {
  height: auto;
  max-height: 78px;
  flex-wrap: wrap;
  align-content: center;
  padding-block: 6px;
  overflow-y: auto;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-context {
  height: auto;
  max-height: 78px;
  align-items: stretch;
  padding-block: 6px;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-context .key-pill {
  min-height: 46px;
  display: grid;
  align-content: center;
  justify-content: stretch;
}

.record-window-task .task-detail-shell.is-header-expanded .task-detail-context .key-pill strong {
  margin-top: 3px;
  font-size: 11px;
}

@container (max-width: 480px) {
  .record-window-task .task-detail-sticky-head,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-sticky-head {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 38px 34px 34px;
  }

  .record-window-task .task-detail-hero {
    grid-column: 1;
    grid-row: 1;
  }

  .record-window-task .task-detail-actions,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-actions {
    grid-column: 1;
    grid-row: 2;
    height: 38px;
    max-height: 38px;
    flex-wrap: nowrap;
    padding: 3px 8px;
    overflow-y: hidden;
  }

  .record-window-task .task-detail-context,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-context {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    max-width: none;
    height: 34px;
    max-height: 34px;
    padding: 2px 8px;
  }

  .record-window-task .task-detail-context .key-pill,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-context .key-pill {
    min-height: 28px;
    display: flex;
    padding: 3px 7px;
  }

  .record-window-task .task-detail-context .key-pill strong,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-context .key-pill strong {
    margin: 0;
    font-size: 9px;
  }

  .record-window-task .task-detail-tab-row {
    grid-column: 1;
    grid-row: 4;
    height: 34px;
    min-height: 34px;
  }

  .record-window-task .task-detail-tab-row .tab {
    min-height: 32px;
    height: 32px;
  }

  .record-window-task .task-detail-shell.is-header-expanded .task-detail-sticky-head {
    max-height: var(--record-header-max) !important;
  }

  .record-window-task .task-detail-shell.is-header-expanded .task-detail-hero {
    padding: 9px 10px;
  }
}

@container (max-width: 460px) {
  .record-window-task .task-detail-hero,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-hero {
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 6px;
    padding: 6px 8px;
  }

  .record-window-task .task-detail-shell.is-header-expanded .task-detail-hero {
    min-height: 132px;
  }

  .record-window-task .task-detail-hero h2,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-hero h2 {
    margin: 0 0 3px;
    font-size: 16px;
    line-height: 1.1;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .record-window-task .task-type-label {
    font-size: 8px;
  }

  .record-window-task .task-detail-meta-line > span {
    min-height: 20px;
    padding: 2px 5px;
    font-size: 9px;
  }

  .record-window-task .task-detail-meter,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-meter {
    width: 68px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 2px;
    padding: 6px;
  }

  .record-window-task .task-detail-meter strong,
  .record-window-task .task-detail-shell.is-header-expanded .task-detail-meter strong {
    grid-row: auto;
    font-size: 18px;
  }

  .record-window-task .task-detail-meter > span {
    font-size: 8px;
  }

  .record-window-task .task-detail-actions .btn {
    min-height: 30px;
    height: 30px;
    padding: 4px 8px;
    font-size: 9px;
  }

  .record-window-task .task-detail-shell > .panel-body {
    padding: 8px 8px 10px;
    scrollbar-gutter: auto;
  }

  .record-window-task .task-detail-shell > .panel-body > .panel-header:first-of-type {
    top: -8px;
    min-height: 42px;
    padding: 6px 0;
  }

  .record-window-task .task-detail-shell > .panel-body > .panel-header:first-of-type h2 {
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .record-window:not(.record-window-task) .record-window-detail > .panel-header {
    padding: 7px 8px 5px;
  }

  .record-window:not(.record-window-task) .record-window-detail > .panel-header .row-actions .btn {
    min-height: 34px;
    height: 34px;
  }

  .record-window:not(.record-window-task) .record-window-detail > .panel-body {
    padding: 8px 8px 10px;
  }
}

html[data-theme="dark"] .record-window-task .task-detail-sticky-head,
html[data-theme="dark"] .record-window-task .task-detail-hero,
html[data-theme="dark"] .record-window-task .task-detail-header-toggle,
html[data-theme="dark"] .record-window-task .task-detail-shell > .panel-body > .panel-header:first-of-type {
  background-color: var(--surface);
}

@media (prefers-reduced-motion: reduce) {
  .record-window,
  .record-window-task .task-detail-header-toggle .icon {
    transition: none;
  }
}
