/* Leave-request detail design candidate. Uses the active Paya theme. */
.leave-workspace dialog.paya-ant-table-detail[data-leave-detail] {
  --leave-gutter: 24px;
  inline-size: min(720px, calc(100% - 32px));
  max-inline-size: none;
  max-block-size: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  color: var(--foreground);
  box-shadow: 0 16px 48px rgb(0 0 0 / 18%);
  letter-spacing: 0;
}

.leave-workspace dialog[data-leave-detail]::backdrop {
  background: rgb(18 28 41 / 47%);
  backdrop-filter: blur(1px);
}

dialog[data-leave-detail] .domain-detail-content {
  display: flex;
  flex-direction: column;
  max-block-size: calc(100dvh - 34px);
  min-block-size: 0;
  background: transparent;
}

dialog[data-leave-detail] .domain-detail-content > header {
  padding: 16px var(--leave-gutter);
  border-block-end: 1px solid var(--border);
  align-items: center;
}


dialog[data-leave-detail] .domain-detail-content > header h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

dialog[data-leave-detail] .domain-detail-content > header button {
  inline-size: auto;
  min-inline-size: 40px;
  min-block-size: 40px;
  padding: 8px;
  border-radius: 8px;
}

dialog[data-leave-detail] .domain-detail-content > .domain-detail-body {
  display: grid;
  align-content: start;
  min-block-size: 0;
  margin: 0;
  padding: 20px 0 0;
  overflow: auto;
  scrollbar-gutter: auto;
}

dialog[data-leave-detail] .domain-full-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 24px;
  margin: 0;
  padding: 0 var(--leave-gutter);
}

dialog[data-leave-detail] .domain-full-details > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-inline-size: 0;
  padding: 12px 0;
  border: 0;
  border-block-end: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

dialog[data-leave-detail] .domain-full-details > div:nth-last-child(-n + 2) {
  border-block-end: 0;
}

dialog[data-leave-detail] .domain-full-details > [data-leave-summary] {
  margin-block-end: 8px;
  padding: 12px 16px;
  border-block-end: 0;
  background: var(--surface-secondary);
}

dialog[data-leave-detail] .domain-full-details > [data-leave-summary="person"] {
  margin-inline-end: -24px;
  border-inline-start: 2px solid var(--accent);
  border-start-start-radius: 8px;
  border-end-start-radius: 8px;
}

dialog[data-leave-detail] .domain-full-details > [data-leave-summary="period"] {
  border-start-end-radius: 8px;
  border-end-end-radius: 8px;
}

dialog[data-leave-detail] .domain-full-details dt {
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.6;
}

dialog[data-leave-detail] .domain-full-details dd {
  margin: 0;
  color: var(--foreground);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

dialog[data-leave-detail] .domain-full-details [data-leave-summary] dd {
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

dialog[data-leave-detail] .domain-full-details .paya-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .8125rem;
  line-height: 1.6;
}

dialog[data-leave-detail] .domain-full-details .paya-badge[data-tone="processing"] {
  background: var(--surface-secondary);
  color: var(--foreground);
}

dialog[data-leave-detail] .domain-card-actions {
  display: block;
  margin: 8px 0 0;
  padding: 12px var(--leave-gutter);
  border-block-start: 1px solid var(--border);
}

dialog[data-leave-detail] .domain-card-actions > span {
  display: flex !important;
  align-items: stretch;
  gap: 8px !important;
}

dialog[data-leave-detail] .domain-card-actions > span > [data-paya-detail-keep-open] {
  display: flex;
  min-inline-size: 0;
}

dialog[data-leave-detail] .domain-card-actions button {
  min-inline-size: 40px;
  min-block-size: 40px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .8125rem;
  line-height: 1.6;
  transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
  text-align: center;
  white-space: normal;
}

dialog[data-leave-detail] .domain-card-actions button[data-variant="destructive"] {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--danger-soft-foreground);
}

dialog[data-leave-detail] .domain-card-actions button[data-variant="destructive"]:hover {
  background: var(--danger-soft);
}

dialog[data-leave-detail] button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  box-shadow: none;
}

@media (max-width: 640px) {
  .leave-workspace dialog.paya-ant-table-detail[data-leave-detail] {
    --leave-gutter: 16px;
    inline-size: calc(100% - 16px);
    max-block-size: calc(100dvh - 16px);
  }

  dialog[data-leave-detail] .domain-detail-content { max-block-size: calc(100dvh - 18px); }
  dialog[data-leave-detail] .domain-detail-content > header h2 { font-size: 1.1875rem; }
  dialog[data-leave-detail] .domain-detail-content > .domain-detail-body { padding-block-start: 12px; }
  dialog[data-leave-detail] .domain-full-details { column-gap: 16px; }
  dialog[data-leave-detail] .domain-full-details > [data-leave-summary] { padding: 8px 12px; }
  dialog[data-leave-detail] .domain-full-details > [data-leave-summary="person"] { margin-inline-end: -16px; }
  dialog[data-leave-detail] .domain-card-actions > span {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  dialog[data-leave-detail] .domain-detail-content > header button,
  dialog[data-leave-detail] .domain-card-actions button {
    min-block-size: 56px;
  }

  dialog[data-leave-detail] .domain-detail-content > header button { min-inline-size: 56px; }
  dialog[data-leave-detail] .domain-card-actions button { inline-size: 100%; }
  dialog[data-leave-detail] .domain-card-actions > span > [data-paya-detail-keep-open] { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  dialog[data-leave-detail] .domain-card-actions button { transition: none; }
}

dialog[data-leave-detail] .domain-card-actions:has(> span:empty:only-child) {
  display: none;
}
