/* Selected fresh-orange palette, shared by the four image-production modes.
   Keep page, menu, typography and layout tokens outside this scope unchanged. */
.production-workspace {
  --production-accent: #f56625;
  --production-accent-hover: #e5551d;
  --production-accent-pressed: #d64b17;
  --production-selected: #fff0e8;
  --production-success-ink: #16785e;
  --production-history-card: var(--surface-alt);
  --production-history-card-hover: #eef1f5;
  --production-history-line: #dde3eb;
}

:root[data-theme="dark"] .production-workspace {
  --production-selected: color-mix(in srgb, #f56625 12%, var(--surface));
  --production-success-ink: #75e3c4;
  --production-history-card: #242424;
  --production-history-card-hover: #2b2b2b;
  --production-history-line: #3f3f3f;
}

/* Opaque primary actions with white text, including hover and pressed states. */
.production-workspace .production-rail :is(.production-footer-actions .primary, .primary.production-top-action) {
  background: var(--production-accent) !important;
  border-color: var(--production-accent) !important;
  color: #ffffff !important;
  opacity: 1;
  filter: none;
}
.production-workspace .production-rail :is(.production-footer-actions .primary, .primary.production-top-action):hover:not(:disabled) {
  background: var(--production-accent-hover) !important;
  border-color: var(--production-accent-hover) !important;
}
.production-workspace .production-rail :is(.production-footer-actions .primary, .primary.production-top-action):active:not(:disabled) {
  background: var(--production-accent-pressed) !important;
  border-color: var(--production-accent-pressed) !important;
}
.production-workspace .production-rail :is(.production-footer-actions .primary, .primary.production-top-action):disabled {
  background: var(--ui-disabled-bg) !important;
  border-color: var(--ui-disabled-bg) !important;
  color: var(--ui-disabled-ink) !important;
  opacity: 1;
}

.production-workspace .production-rail .production-clear-row > button:not(.production-top-action) {
  color: var(--production-accent);
}
.production-workspace .production-rail .production-clear-row > .production-top-action:not(.primary) {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
.production-workspace .production-rail .production-clear-row > .production-top-action:not(.primary):hover:not(:disabled) {
  background: var(--surface-alt);
  color: var(--ink);
  border-color: var(--line);
}
.production-workspace .production-reference-thumb > b {
  background: var(--production-accent);
  color: #ffffff;
}
.production-workspace .production-readiness.ready {
  color: var(--production-success-ink);
}

/* The inset marker does not change row size or move the existing controls. */
.production-workspace .production-history-list {
  row-gap: 10px;
}
.production-workspace .production-history-item {
  background: var(--production-history-card);
  border-color: var(--production-history-line);
}
.production-workspace .production-history-item.active {
  background: var(--production-selected);
  border-color: color-mix(in srgb, var(--production-accent) 35%, var(--production-history-line));
  box-shadow: inset 3px 0 0 var(--production-accent);
}
.production-workspace .production-history-item .production-history-open,
.production-workspace .production-history-item .production-history-open:hover:not(:disabled) {
  background: transparent;
  color: inherit;
}
.production-workspace .production-history-item:not(.active):hover {
  background: var(--production-history-card-hover);
  border-color: var(--line-strong);
}
.production-workspace .production-history-open strong {
  padding-inline-end: 24px;
}
.production-workspace .production-history-delete {
  background: transparent;
  color: var(--muted);
  opacity: 1;
}
.production-workspace .production-history-delete:hover:not(:disabled) {
  background: var(--production-selected);
  color: var(--production-accent);
}
.production-workspace .production-history-delete:disabled {
  color: var(--muted);
  opacity: .45;
}

.production-workspace .production-thumbnail[aria-current="true"] {
  border-color: var(--production-accent);
  box-shadow: inset 0 0 0 1px var(--production-accent);
}
.production-workspace .production-viewer-arrow:hover:not(:disabled) {
  border-color: var(--production-accent);
}
.production-workspace .sku-mode-options button:is(.active, [aria-pressed="true"]) {
  background: var(--production-selected);
  border-color: var(--production-accent);
}
.production-workspace :is(button, .button, input, select, textarea):focus-visible {
  outline: 2px solid var(--production-accent);
  outline-offset: 2px;
}
.production-workspace .production-history-search:focus-within {
  border-color: var(--production-accent);
}

/* Status meanings and chip fills are identical in both themes. */
:root .app-shell .production-workspace .badge:not(.reference-badge) {
  --production-state-bg: var(--ui-cancelled-bg);
  --production-state-ink: #687383;
  background: var(--production-state-bg);
  color: var(--production-state-ink);
  border-color: var(--production-state-bg);
}
:root .app-shell .production-workspace .badge:is(.completed, .approved) {
  --production-state-bg: var(--ui-success-bg);
  --production-state-ink: #16785e;
}
:root .app-shell .production-workspace .badge:is(.draft, .pending, .queued, .partial, .reconcile) {
  --production-state-bg: var(--ui-pending-bg);
  --production-state-ink: #7053bd;
}
:root .app-shell .production-workspace .badge.running {
  --production-state-bg: var(--ui-running-bg);
  --production-state-ink: #315fc7;
}
:root .app-shell .production-workspace .badge:is(.failed, .rejected) {
  --production-state-bg: var(--ui-failed-bg);
  --production-state-ink: #b52a68;
}
:root .app-shell .production-workspace .badge:not(.reference-badge) svg {
  color: var(--production-state-ink);
}

/* Only the light theme replaces the old dark viewer and thumbnail surfaces. */
:root[data-theme="light"] .production-workspace .production-history:not(.collapsed) {
  background: var(--surface);
}
:root[data-theme="light"] .production-workspace .production-viewer-media {
  background: var(--surface-alt);
}
:root[data-theme="light"] .production-workspace .production-thumbnail {
  background: var(--surface);
}
:root[data-theme="light"] .production-workspace .production-thumbnail[aria-current="true"] span {
  color: var(--ink);
}
:root[data-theme="light"] .production-workspace .production-viewer-arrow {
  background: var(--surface-alt);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}
:root[data-theme="light"] .production-workspace .production-viewer-arrow:hover:not(:disabled) {
  background: var(--surface);
  border-color: var(--production-accent);
}

/* This class belongs only to the shared history-delete confirmation. */
.modal.production-history-delete-dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  border-radius: 12px;
}
.production-history-delete-dialog > header {
  padding: 18px 20px;
}
.production-history-delete-dialog > header h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}
.production-history-delete-dialog > header .icon-button {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.production-history-delete-dialog > header .icon-button:hover:not(:disabled) {
  background: var(--surface-alt);
  color: var(--ink);
}
.production-history-delete-copy {
  padding: 20px;
}
.production-delete-task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-alt);
}
.production-delete-task-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  height: 28px;
  color: var(--muted);
}
.production-delete-task > div {
  min-width: 0;
}
.production-delete-task strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.65;
}
.production-delete-task small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.production-delete-task .badge {
  font-size: 10px;
  padding: 2px 6px;
}
.production-history-delete-copy .production-delete-question {
  margin: 18px 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
.production-history-delete-copy .production-delete-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}
.production-history-delete-dialog > .modal-footer {
  padding: 14px 20px;
  gap: 10px;
}
.production-history-delete-dialog > .modal-footer button {
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 7px;
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.production-history-delete-dialog > .modal-footer button:hover:not(:disabled) {
  background: var(--surface-alt);
}
.production-history-delete-dialog > .modal-footer .danger {
  background: #d24335;
  border-color: #d24335;
  color: #ffffff;
  opacity: 1;
}
.production-history-delete-dialog > .modal-footer .danger:hover:not(:disabled) {
  background: #c93e30;
  border-color: #c93e30;
  color: #ffffff;
}
.production-history-delete-dialog > .modal-footer .danger:active:not(:disabled) {
  background: #b8372b;
  border-color: #b8372b;
}
.production-history-delete-dialog :is(button, .button):focus-visible {
  outline: 2px solid #f56625;
  outline-offset: 2px;
}
.production-history-delete-dialog > .modal-footer button:disabled {
  background: var(--ui-disabled-bg);
  border-color: var(--ui-disabled-bg);
  color: var(--ui-disabled-ink);
  opacity: 1;
}
