/*
 * Product request workflow
 *
 * Layout and component rules stay stable while every color is sourced from
 * the shared semantic token layer. This keeps the request form, review flow,
 * attachment viewer, and accounting dialog in sync with the active theme.
 */

:where(.pr-overlay, .pr-modal, .pr-page) {
    --pr-canvas: var(--ui-canvas);
    --pr-surface: var(--ui-surface);
    --pr-surface-muted: var(--ui-surface-muted);
    --pr-surface-raised: var(--ui-surface-raised);
    --pr-text: var(--ui-text);
    --pr-text-muted: var(--ui-text-muted);
    --pr-text-faint: var(--ui-text-faint);
    --pr-border: var(--ui-border);
    --pr-border-soft: var(--ui-border-soft);
    --pr-action: var(--ui-action);
    --pr-action-hover: var(--ui-action-hover);
    --pr-on-action: var(--ui-on-action);
    --pr-focus: var(--ui-focus);
    --pr-overlay-color: var(--ui-overlay);
    --pr-success: var(--ui-success);
    --pr-success-solid: var(--ui-success-solid);
    --pr-success-soft: var(--ui-success-soft);
    --pr-warning: var(--ui-warning);
    --pr-warning-solid: var(--ui-warning-solid);
    --pr-warning-soft: var(--ui-warning-soft);
    --pr-danger: var(--ui-danger);
    --pr-danger-solid: var(--ui-danger-solid);
    --pr-danger-soft: var(--ui-danger-soft);
    --pr-info: var(--ui-info);
    --pr-info-soft: var(--ui-info-soft);
    color: var(--pr-text);
    font-family: var(--ui-font-body);
}

.pr-overlay {
    position: fixed;
    inset: 0;
    isolation: isolate;
}

.pr-overlay--page {
    z-index: 400;
    overflow-y: auto;
    background: var(--pr-canvas);
}

.pr-overlay--dialog {
    z-index: 450;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    background: var(--pr-overlay-color);
    backdrop-filter: blur(3px);
}

.pr-overlay__panel {
    display: block;
    width: min(61.25rem, 100%);
    max-height: calc(100dvh - clamp(1.5rem, 4vw, 3rem));
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--pr-border-soft);
    border-radius: var(--ui-radius-lg);
    background: var(--pr-canvas);
    box-shadow: var(--ui-shadow-float);
}

.pr-overlay__panel--hidden {
    display: none;
}

.pr-page {
    width: min(100%, var(--ui-reading-width));
    margin-inline: auto;
    padding: clamp(1rem, 2vw, 1.75rem) var(--ui-gutter) clamp(1.5rem, 4vw, 3rem);
    color: var(--pr-text);
}

.pr-page--review {
    width: min(100%, 52rem);
}

.pr-page__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ui-space-4);
    margin-bottom: var(--ui-space-5);
}

.pr-page__heading {
    min-width: 0;
}

.pr-page__eyebrow {
    margin: 0 0 var(--ui-space-1);
    color: var(--pr-action);
    font-family: var(--ui-font-label);
    font-size: var(--ui-text-xs);
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pr-page__title {
    margin: 0;
    color: var(--pr-text);
    font-size: var(--ui-text-xl);
    line-height: 1.2;
}

.pr-page__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ui-space-1);
    margin: var(--ui-space-1) 0 0;
    color: var(--pr-text-muted);
    font-size: var(--ui-text-sm);
}

.pr-page__meta strong {
    color: var(--pr-text);
    font-variant-numeric: tabular-nums;
}

.pr-form,
.pr-field-stack,
.pr-process {
    display: flex;
    flex-direction: column;
}

.pr-form {
    gap: var(--ui-space-4);
}

.pr-field-stack {
    gap: var(--ui-space-3);
}

.pr-process {
    gap: var(--ui-space-4);
}

.pr-card {
    margin: 0;
    border: 1px solid var(--pr-border-soft);
    border-radius: var(--ui-radius-md);
    padding: clamp(1rem, 2.5vw, 1.35rem);
    background: var(--pr-surface);
    box-shadow: var(--ui-shadow-panel);
}

.pr-card--success {
    border-color: var(--pr-success);
    background: var(--pr-success-soft);
}

.pr-card__title {
    margin: 0 0 var(--ui-space-4);
    border-bottom: 1px solid var(--pr-border-soft);
    padding-bottom: var(--ui-space-2);
    color: var(--pr-text);
    font-size: var(--ui-text-md);
    font-weight: 750;
    letter-spacing: -0.01em;
}

.pr-field-grid,
.pr-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ui-space-3);
}

.pr-field {
    min-width: 0;
}

.pr-field--wide,
.pr-detail--wide {
    grid-column: 1 / -1;
}

.pr-label {
    display: block;
    margin: 0 0 var(--ui-space-1);
    color: var(--pr-text);
    font-size: var(--ui-text-sm);
    font-weight: 700;
}

.pr-label__hint {
    margin-inline-start: var(--ui-space-1);
    color: var(--pr-text-faint);
    font-weight: 450;
}

.pr-required {
    color: var(--pr-danger);
}

.pr-control {
    display: block;
    width: 100%;
    min-height: var(--ui-control-height);
    box-sizing: border-box;
    border: 1px solid var(--pr-border);
    border-radius: var(--ui-radius-sm);
    padding: 0.6rem 0.75rem;
    background: var(--pr-surface-raised);
    color: var(--pr-text);
    font: inherit;
    font-size: var(--ui-text-sm);
    line-height: 1.35;
    transition: border-color var(--ui-duration-fast) ease,
        background-color var(--ui-duration-fast) ease;
}

.pr-control::placeholder {
    color: var(--pr-text-faint);
    opacity: 1;
}

.pr-control:hover:not(:disabled):not([readonly]) {
    border-color: var(--pr-action);
}

.pr-control:focus {
    border-color: var(--pr-focus);
    outline: 3px solid var(--ui-selection);
    outline-offset: 1px;
}

.pr-control:disabled,
.pr-control[readonly] {
    background: var(--pr-surface-muted);
    color: var(--pr-text-muted);
    cursor: not-allowed;
}

.pr-control--textarea {
    min-height: 5.5rem;
    resize: vertical;
}

.pr-btn,
.pr-link-btn,
.pr-modal__close {
    appearance: none;
    border: 0;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.pr-btn {
    display: inline-flex;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    gap: var(--ui-space-2);
    border: 1px solid transparent;
    border-radius: var(--ui-radius-sm);
    padding: 0.55rem 1rem;
    color: var(--pr-text);
    font-size: var(--ui-text-sm);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--ui-duration-fast) ease,
        border-color var(--ui-duration-fast) ease,
        transform var(--ui-duration-fast) var(--ui-ease);
}

.pr-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.pr-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pr-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.pr-btn--small {
    min-height: 2rem;
    padding: 0.38rem 0.7rem;
    font-size: var(--ui-text-xs);
}

.pr-btn--primary {
    background: var(--pr-action);
    color: var(--pr-on-action);
}

.pr-btn--primary:hover:not(:disabled) {
    background: var(--pr-action-hover);
}

.pr-btn--secondary {
    border-color: var(--pr-border);
    background: var(--pr-surface-raised);
    color: var(--pr-text);
}

.pr-btn--secondary:hover:not(:disabled),
.pr-btn--quiet:hover:not(:disabled) {
    border-color: var(--pr-action);
    background: var(--pr-surface-muted);
    color: var(--pr-action);
}

.pr-btn--quiet {
    border-color: transparent;
    background: var(--pr-surface-muted);
    color: var(--pr-text-muted);
}

.pr-btn--success {
    background: var(--pr-success-solid);
    color: var(--pr-on-action);
}

.pr-btn--warning {
    background: var(--pr-warning-solid);
    color: var(--pr-on-action);
}

.pr-btn--danger {
    border-color: var(--pr-danger-solid);
    background: var(--pr-danger-solid);
    color: var(--pr-on-action);
}

.pr-btn--danger:hover:not(:disabled) {
    background: var(--pr-danger-solid);
    color: var(--pr-on-action);
}

.pr-btn--danger-soft {
    border-color: var(--pr-danger);
    background: var(--pr-danger-soft);
    color: var(--pr-danger);
}

.pr-btn--danger-soft:hover:not(:disabled) {
    border-color: var(--pr-danger);
    background: var(--pr-danger-soft);
    color: var(--pr-danger);
}

.pr-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
}

.pr-actions--form {
    margin-top: var(--ui-space-1);
}

.pr-actions--callout {
    margin-top: var(--ui-space-3);
}

.pr-upload-group {
    margin-bottom: var(--ui-space-4);
}

.pr-upload-group--last {
    margin-bottom: 0;
}

.pr-upload-group--inset {
    margin: var(--ui-space-4) 0 0;
    border-top: 1px solid var(--pr-border-soft);
    padding-top: var(--ui-space-3);
}

.pr-file-control {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
    margin-top: var(--ui-space-2);
}

.pr-file-picker {
    cursor: pointer;
}

.pr-file-name,
.pr-help-text,
.pr-empty-hint,
.pr-muted {
    color: var(--pr-text-muted);
}

.pr-file-name,
.pr-help-text,
.pr-empty-hint {
    font-size: var(--ui-text-xs);
}

.pr-help-text,
.pr-empty-hint {
    margin: var(--ui-space-1) 0 0;
}

.pr-file-preview,
.pr-media-preview,
.pr-attachments,
.pr-attachment-section {
    margin-top: var(--ui-space-3);
}

.pr-preview-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 6rem;
    border: 1px solid var(--pr-border-soft);
    border-radius: var(--ui-radius-sm);
    object-fit: contain;
    background: var(--pr-surface-muted);
}

.pr-preview-image--large {
    max-height: 8rem;
    margin-top: var(--ui-space-1);
}

.pr-attachment-section__label {
    margin: 0 0 var(--ui-space-2);
    color: var(--pr-text);
    font-size: var(--ui-text-xs);
    font-weight: 700;
}

.pr-attachment-section__label--muted {
    color: var(--pr-text-muted);
}

.pr-file-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 0 var(--ui-space-2);
    padding: 0;
    list-style: none;
}

.pr-file-list__item {
    display: flex;
    align-items: center;
    gap: var(--ui-space-2);
    min-width: 0;
    border-bottom: 1px solid var(--pr-border-soft);
    padding: 0.4rem 0;
    font-size: var(--ui-text-sm);
}

.pr-file-list__name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pr-link-btn {
    padding: var(--ui-space-1);
    background: transparent;
    color: var(--pr-action);
    font-size: var(--ui-text-xs);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.pr-link-btn--danger {
    color: var(--pr-danger);
}

.pr-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

.pr-detail {
    display: grid;
    grid-template-columns: minmax(6.5rem, 0.42fr) minmax(0, 1fr);
    align-items: baseline;
    gap: var(--ui-space-2);
    min-width: 0;
    font-size: var(--ui-text-sm);
}

.pr-detail__label {
    color: var(--pr-text-muted);
}

.pr-detail__label::after {
    content: "：";
}

.pr-link {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--pr-action);
    font-weight: 650;
}

.pr-attachment-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
    margin-top: var(--ui-space-2);
}

.pr-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: var(--ui-radius-pill);
    padding: 0.18rem 0.55rem;
    background: var(--pr-surface-muted);
    color: var(--pr-text-muted);
    font-size: var(--ui-text-xs);
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}

.pr-badge--strong {
    padding-inline: 0.75rem;
}

.pr-badge--success {
    background: var(--pr-success-soft);
    color: var(--pr-success);
}

.pr-badge--warning {
    background: var(--pr-warning-soft);
    color: var(--pr-warning);
}

.pr-badge--danger {
    background: var(--pr-danger-soft);
    color: var(--pr-danger);
}

.pr-badge--info {
    background: var(--pr-info-soft);
    color: var(--pr-info);
}

.pr-process-stage {
    --pr-stage: var(--pr-text-muted);
    overflow: hidden;
    border: 1px solid var(--pr-border-soft);
    border-inline-start: 3px solid var(--pr-stage);
    border-radius: var(--ui-radius-md);
    background: var(--pr-surface-raised);
}

.pr-process-stage--warning {
    --pr-stage: var(--pr-warning);
}

.pr-process-stage--action {
    --pr-stage: var(--pr-action);
}

.pr-process-stage--success {
    --pr-stage: var(--pr-success);
}

.pr-process-stage__header {
    display: flex;
    align-items: center;
    gap: var(--ui-space-2);
    border-bottom: 1px solid var(--pr-border-soft);
    padding: 0.6rem 0.8rem;
    background: var(--pr-surface-muted);
    color: var(--pr-stage);
}

.pr-process-stage__number {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: var(--ui-text-xs);
    font-weight: 800;
}

.pr-process-stage__title {
    color: var(--pr-text);
    font-size: var(--ui-text-sm);
    font-weight: 750;
}

.pr-process-stage__body {
    display: flex;
    flex-direction: column;
    gap: var(--ui-space-2);
    padding: var(--ui-space-3);
}

.pr-process-stage__empty {
    padding-block: var(--ui-space-1);
    color: var(--pr-text-faint);
    font-size: var(--ui-text-sm);
}

.pr-process-stage__empty--inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
}

.pr-approver {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
    border: 1px solid transparent;
    border-radius: var(--ui-radius-sm);
    padding: 0.55rem 0.7rem;
    background: var(--pr-surface-muted);
    font-size: var(--ui-text-sm);
}

.pr-approver--current {
    border-color: var(--pr-info);
    background: var(--pr-info-soft);
}

.pr-approver__content {
    min-width: 0;
    flex: 1;
}

.pr-approver__heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
}

.pr-approver__date {
    display: block;
    margin-top: var(--ui-space-1);
    color: var(--pr-text-faint);
    font-size: var(--ui-text-xs);
}

.pr-comment {
    margin-top: var(--ui-space-2);
    border-radius: var(--ui-radius-xs);
    padding: 0.35rem 0.55rem;
    background: var(--pr-success-soft);
    color: var(--pr-success);
    font-size: var(--ui-text-xs);
}

.pr-comment--danger {
    background: var(--pr-danger-soft);
    color: var(--pr-danger);
}

.pr-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ui-space-4);
    margin-bottom: var(--ui-space-4);
    border: 1px solid var(--pr-info);
    border-radius: var(--ui-radius-md);
    padding: var(--ui-space-4);
    background: var(--pr-info-soft);
}

.pr-callout--danger {
    align-items: flex-start;
    margin: var(--ui-space-4) 0 0;
    border-color: var(--pr-danger);
    background: var(--pr-danger-soft);
}

.pr-callout__title,
.pr-callout__text,
.pr-callout__meta {
    margin: 0;
}

.pr-callout__title {
    color: var(--pr-text);
    font-size: var(--ui-text-sm);
    font-weight: 750;
}

.pr-callout__text {
    margin-top: var(--ui-space-1);
    color: var(--pr-text);
    font-size: var(--ui-text-sm);
}

.pr-callout__meta {
    margin-top: var(--ui-space-1);
    color: var(--pr-text-muted);
    font-size: var(--ui-text-xs);
}

.pr-purchasing-panel {
    margin-bottom: var(--ui-space-4);
    border: 1px solid var(--pr-success);
    border-radius: var(--ui-radius-md);
    padding: var(--ui-space-4);
    background: var(--pr-success-soft);
}

.pr-purchasing-panel__intro {
    margin: 0 0 var(--ui-space-3);
    color: var(--pr-success);
    font-size: var(--ui-text-sm);
    font-weight: 750;
}

.pr-approval-comment {
    margin-bottom: var(--ui-space-4);
}

.pr-empty-state,
.pr-loading {
    padding: clamp(2.5rem, 10vw, 5rem) var(--ui-space-4);
    color: var(--pr-text-muted);
    text-align: center;
}

/* Attachment and accounting dialogs */
.pr-modal {
    position: fixed;
    inset: 0;
    z-index: 650;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    overscroll-behavior: contain;
    padding: clamp(0.75rem, 2vw, 1.25rem);
    background: var(--pr-overlay-color);
    backdrop-filter: blur(3px);
}

.pr-modal--accounting {
    z-index: 100000;
}

.pr-modal__dialog {
    width: min(100%, 47.5rem);
    max-height: min(88dvh, 47.5rem);
    overflow: auto;
    border: 1px solid var(--pr-border-soft);
    border-radius: var(--ui-radius-lg);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    background: var(--pr-surface-raised);
    color: var(--pr-text);
    box-shadow: var(--ui-shadow-float);
}

.pr-modal__dialog--preview {
    width: min(100%, 53.75rem);
}

.pr-modal__dialog--accounting {
    width: min(100%, 35rem);
    max-height: 90dvh;
}

.pr-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ui-space-3);
    margin-bottom: var(--ui-space-4);
}

.pr-modal__title {
    min-width: 0;
    margin: 0;
    color: var(--pr-text);
    font-size: var(--ui-text-lg);
    font-weight: 750;
}

.pr-modal__title--truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pr-modal__count {
    display: inline-flex;
    min-width: 1.5rem;
    justify-content: center;
    margin-inline-start: var(--ui-space-2);
    border-radius: var(--ui-radius-pill);
    padding-inline: var(--ui-space-2);
    background: var(--pr-surface-muted);
    color: var(--pr-text-muted);
    font-size: var(--ui-text-xs);
}

.pr-modal__close {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: var(--ui-radius-sm);
    background: transparent;
    color: var(--pr-text-muted);
    font-size: var(--ui-text-lg);
    cursor: pointer;
}

.pr-modal__close:hover {
    background: var(--pr-surface-muted);
    color: var(--pr-text);
}

.pr-modal__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
    margin-top: var(--ui-space-4);
}

.pr-modal-file-list {
    display: flex;
    max-height: 60dvh;
    flex-direction: column;
    gap: var(--ui-space-2);
    overflow: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pr-modal-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ui-space-3);
    border: 1px solid var(--pr-border-soft);
    border-radius: var(--ui-radius-sm);
    padding: 0.7rem;
    background: var(--pr-surface-muted);
}

.pr-modal-file__content {
    min-width: 0;
    flex: 1;
}

.pr-modal-file__name {
    overflow: hidden;
    color: var(--pr-text);
    font-size: var(--ui-text-sm);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pr-modal-file__meta {
    margin-top: var(--ui-space-1);
    color: var(--pr-text-faint);
    font-size: var(--ui-text-xs);
}

.pr-modal-file__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--ui-space-2);
}

.pr-preview-unsupported,
.pr-preview-text,
.pr-preview-media,
.pr-preview-frame {
    overflow: auto;
    border: 1px solid var(--pr-border-soft);
    border-radius: var(--ui-radius-md);
    background: var(--pr-surface-muted);
}

.pr-preview-unsupported {
    border-style: dashed;
    padding: var(--ui-space-5);
    color: var(--pr-text-muted);
    text-align: center;
}

.pr-preview-text {
    max-height: 62dvh;
    padding: var(--ui-space-3);
}

.pr-preview-text pre {
    margin: 0;
    color: var(--pr-text);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: var(--ui-text-xs);
    white-space: pre-wrap;
    word-break: break-word;
}

.pr-preview-media {
    display: flex;
    max-height: 68dvh;
    justify-content: center;
    padding: var(--ui-space-3);
}

.pr-preview-media img {
    max-width: 100%;
    max-height: 64dvh;
    object-fit: contain;
}

.pr-preview-frame {
    height: min(68dvh, 45rem);
}

.pr-preview-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--pr-surface-raised);
}

.pr-product-summary {
    margin-bottom: var(--ui-space-4);
    border: 1px solid var(--pr-border-soft);
    border-radius: var(--ui-radius-md);
    padding: var(--ui-space-3);
    background: var(--pr-surface-muted);
}

.pr-product-summary__title {
    color: var(--pr-text);
    font-size: var(--ui-text-sm);
    font-weight: 750;
}

.pr-product-summary__meta {
    margin-top: var(--ui-space-1);
    color: var(--pr-text-muted);
    font-size: var(--ui-text-xs);
}

.pr-modal__dialog--accounting .pr-field + .pr-field {
    margin-top: var(--ui-space-3);
}

@media (max-width: 40rem) {
    .pr-overlay--dialog,
    .pr-modal {
        align-items: flex-start;
        padding: var(--ui-space-2);
    }

    .pr-overlay__panel,
    .pr-modal__dialog {
        max-height: calc(100dvh - var(--ui-space-4));
        border-radius: var(--ui-radius-md);
    }

    .pr-page {
        padding-inline: var(--ui-space-3);
    }

    .pr-page__header,
    .pr-callout {
        align-items: stretch;
        flex-direction: column;
    }

    .pr-page__header > .pr-btn,
    .pr-callout > .pr-btn {
        width: 100%;
    }

    .pr-field-grid,
    .pr-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pr-field--wide,
    .pr-detail--wide {
        grid-column: auto;
    }

    .pr-detail {
        grid-template-columns: minmax(5.75rem, 0.4fr) minmax(0, 1fr);
    }

    .pr-actions,
    .pr-modal__actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .pr-actions .pr-btn,
    .pr-modal__actions .pr-btn {
        width: 100%;
        min-height: 2.75rem;
    }

    .pr-file-control {
        align-items: stretch;
    }

    .pr-file-name {
        width: 100%;
        order: 3;
    }

    .pr-modal-file {
        align-items: stretch;
        flex-direction: column;
    }

    .pr-modal-file__actions,
    .pr-modal-file__actions .pr-btn {
        width: 100%;
    }

    .pr-modal-file__actions .pr-btn {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pr-btn,
    .pr-control {
        transition-duration: 1ms;
    }
}
