@layer components {
    :where(html[data-ds]) .loading {
        display: flex;
        align-items: center;
        gap: var(--ds-space-3);
        color: var(--ds-color-text-muted);
        font-size: var(--ds-text-body-sm-size);
    }

    :where(html[data-ds]) .spinner {
        display: inline-block;
        flex: none;
        width: var(--ds-space-5);
        height: var(--ds-space-5);
        border: var(--ds-border-width-2) solid var(--ds-color-border);
        border-block-start-color: var(--ds-color-text);
        border-radius: var(--ds-radius-pill);
        animation: ds-spin calc(var(--ds-duration-slow) * 2) linear infinite;
    }

    :where(html[data-ds]) .pay-mark {
        width: calc(var(--ds-space-12) + var(--ds-space-2));
        height: calc(var(--ds-space-12) + var(--ds-space-2));
        margin-block-end: var(--ds-space-3);
    }

    :where(html[data-ds]) .pay-mark svg {
        display: block;
        width: 100%;
        height: 100%;
        overflow: visible;
    }

    :where(html[data-ds]) .pay-mark :is(circle, path) {
        fill: none;
        stroke-width: 3;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    :where(html[data-ds]) .pay-mark-track {
        stroke: var(--ds-color-border);
    }

    :where(html[data-ds]) .pay-mark-ring {
        stroke: var(--ds-color-text);
        stroke-dasharray: 100;
        stroke-dashoffset: 72;
        transform-box: fill-box;
        transform-origin: center;
        animation: ds-spin calc(var(--ds-duration-slow) * 2) linear infinite;
    }

    :where(html[data-ds]) .pay-mark-check {
        stroke: var(--ds-color-text);
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
    }

    :where(html[data-ds]) .pay-mark[data-mark="done"] .pay-mark-ring {
        animation: ds-pay-mark-close var(--ds-duration-enter) var(--ds-easing-out) forwards;
    }

    :where(html[data-ds]) .pay-mark[data-mark="done"] .pay-mark-check {
        animation: ds-pay-mark-draw var(--ds-duration-medium) var(--ds-easing-out) var(--ds-duration-enter) forwards;
    }

    :where(html[data-ds]) .pay-status-page {
        max-inline-size: 45rem;
        padding-block: var(--ds-space-10) var(--ds-space-16);
    }

    :where(html[data-ds]) .pay-status-salon {
        margin: 0;
        color: var(--ds-color-text-muted);
        font-family: var(--ds-text-label-family);
        font-size: var(--ds-text-label-size);
        font-weight: var(--ds-text-label-weight);
        letter-spacing: var(--ds-text-label-tracking);
        text-transform: var(--ds-text-label-transform);
    }

    :where(html[data-ds]) .pay-status-note {
        color: var(--ds-color-text-muted);
        font-size: var(--ds-text-body-sm-size);
    }

    :where(html[data-ds]) .pay-status {
        display: flex;
        flex-direction: column;
        gap: var(--ds-space-4);
    }

    :where(html[data-ds]) .pay-status-title {
        display: grid;
        margin: 0;
        overflow-x: clip;
        overflow-y: clip;
        overflow-clip-margin: var(--ds-space-2);
        font-size: var(--ds-font-size-4xl);
        font-weight: var(--ds-font-weight-semibold);
        letter-spacing: var(--ds-font-tracking-display);
        line-height: var(--ds-font-line-height-tight);
    }

    :where(html[data-ds]) .pay-status-value {
        display: grid;
        margin: 0;
        overflow: hidden;
        justify-items: end;
    }

    :where(html[data-ds]) :is(.pay-status-title, .pay-status-value) > span {
        grid-area: 1 / 1;
    }

    :where(html[data-ds]) .pay-status-title > .pay-status-text {
        transform-origin: left center;
    }

    :where(html[data-ds]) .pay-status-bar {
        position: relative;
        block-size: var(--ds-border-width-2);
        overflow: hidden;
        background-color: var(--ds-color-border);
    }

    :where(html[data-ds]) .pay-status-bar::before {
        content: "";
        position: absolute;
        inset-block: 0;
        inset-inline-start: 0;
        inline-size: 30%;
        background-color: var(--ds-color-text);
        animation: ds-pay-status-slide calc(var(--ds-duration-slow) * 3) var(--ds-easing-standard) infinite;
    }

    :where(html[data-ds]) .pay-status.is-paid .pay-status-bar::before {
        inline-size: 100%;
        animation: none;
    }

    :where(html[data-ds]) .pay-status-receipt {
        display: flex;
        flex-direction: column;
        margin: 0;
    }

    :where(html[data-ds]) .pay-status-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--ds-space-4);
        padding-block: var(--ds-space-3);
        border-block-end: var(--ds-border-width-1) solid var(--ds-color-border);
    }

    :where(html[data-ds]) .pay-status-row dd {
        margin: 0;
    }

    :where(html[data-ds]) .pay-status-payment {
        border-block-end: 0;
    }

    :where(html[data-ds]) .pay-status-payment dt {
        color: var(--ds-color-text-muted);
        font-family: var(--ds-text-label-family);
        font-size: var(--ds-text-label-size);
        font-weight: var(--ds-text-label-weight);
        letter-spacing: var(--ds-text-label-tracking);
        text-transform: var(--ds-text-label-transform);
    }

    :where(html[data-ds]) :is(.pay-status-mono, .pay-status-value) {
        font-family: var(--ds-text-data-family);
        font-variant-numeric: var(--ds-text-data-numeric);
    }

    :where(html[data-ds]) .pay-status.is-paid .pay-status-value {
        font-weight: var(--ds-font-weight-semibold);
    }

    :where(html[data-ds]) .pay-status.is-arriving .pay-status-bar::before {
        animation: ds-pay-status-fill var(--ds-duration-enter) var(--ds-easing-out);
    }

    :where(html[data-ds]) .pay-status.is-arriving .pay-status-title > .pay-status-old {
        animation: ds-pay-status-out var(--ds-duration-slow) var(--ds-easing-out) both;
    }

    :where(html[data-ds]) .pay-status.is-arriving .pay-status-title > .pay-status-text {
        animation: ds-pay-status-in var(--ds-duration-slow) var(--ds-easing-out) var(--ds-duration-fast) both, ds-pay-status-grow var(--ds-duration-slow) var(--ds-easing-out) var(--ds-duration-slow) both;
    }

    :where(html[data-ds]) .pay-status.is-arriving .pay-status-value > .pay-status-old {
        animation: ds-pay-status-out var(--ds-duration-slow) var(--ds-easing-out) var(--ds-duration-slow) both;
    }

    :where(html[data-ds]) .pay-status.is-arriving .pay-status-value > .pay-status-text {
        animation: ds-pay-status-in var(--ds-duration-slow) var(--ds-easing-out) var(--ds-duration-enter) both;
    }

    :where(html[data-ds]) .empty {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--ds-space-3);
        padding: var(--ds-space-8) var(--ds-space-6);
        border-radius: var(--ds-radius-lg);
        background-color: var(--ds-color-surface);
    }

    :where(html[data-ds]) .empty-label {
        margin: 0;
        color: var(--ds-color-text-muted);
        font-family: var(--ds-text-label-family);
        font-size: var(--ds-text-label-size);
        font-weight: var(--ds-text-label-weight);
        letter-spacing: var(--ds-text-label-tracking);
        text-transform: var(--ds-text-label-transform);
    }

    :where(html[data-ds]) .empty-title {
        margin: 0;
        font-size: var(--ds-text-h3-size);
        line-height: var(--ds-text-h3-line-height);
    }

    :where(html[data-ds]) .empty-text {
        margin: 0;
        color: var(--ds-color-text-muted);
    }

    :where(html[data-ds]) .empty .btn {
        margin-block-start: var(--ds-space-2);
    }

    @keyframes ds-spin {
        to {
            rotate: 360deg;
        }
    }

    @keyframes ds-pay-status-slide {
        from {
            translate: -100% 0;
        }

        to {
            translate: 340% 0;
        }
    }

    @keyframes ds-pay-status-fill {
        from {
            inline-size: 30%;
        }
    }

    @keyframes ds-pay-status-out {
        to {
            translate: 0 -100%;
            opacity: 0;
        }
    }

    @keyframes ds-pay-status-in {
        from {
            translate: 0 100%;
            opacity: 0;
        }
    }

    @keyframes ds-pay-status-grow {
        0%,
        100% {
            scale: 1;
        }

        30% {
            scale: 1.12;
        }
    }

    @keyframes ds-pay-mark-close {
        from {
            stroke-dashoffset: 72;
            rotate: -90deg;
        }

        to {
            stroke-dashoffset: 0;
            rotate: 270deg;
        }
    }

    @keyframes ds-pay-mark-draw {
        to {
            stroke-dashoffset: 0;
        }
    }
}
