/* Digital workers selector. Scoped to the category handle body class. */
#html-body.catalog-category-view.mp-digital-workers {
    /* No-JS and first-paint reserve. A measured bar height replaces this and already includes the safe area. */
    --mp-dw-bar-height: calc(160px + env(safe-area-inset-bottom));
    background: #fff;
    color: #0f172a;
}

#html-body.catalog-category-view.mp-digital-workers :is(.page-main, .columns, .column.main) {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#html-body.catalog-category-view.mp-digital-workers .breadcrumbs {
    box-sizing: border-box;
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 48px 0;
}

.mp-dw {
    min-width: 0;
    max-width: 100%;
    color: #0f172a;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.mp-dw-wrap {
    box-sizing: border-box;
    width: min(1440px, 100%);
    margin-inline: auto;
    padding-inline: 48px;
}

.mp-dw-hero {
    background: #0f172a;
    color: #fff;
}

.mp-dw-hero .mp-dw-wrap {
    padding-block: 32px;
}

.mp-dw h1,
.mp-dw h2,
.mp-dw h3,
.mp-dw p {
    margin: 0;
    overflow-wrap: anywhere;
}

.mp-dw h1,
.mp-dw h2,
.mp-dw h3 {
    font-weight: 650;
}

.mp-dw h1 {
    font-size: 40px;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.mp-dw-hero p {
    max-width: 42rem;
    margin-top: 8px;
    color: #e2e8f0;
    font-size: 16px;
}

.mp-dw-body {
    padding-bottom: 48px;
}

.mp-dw-setup,
.mp-dw-card,
.mp-dw-summary,
.mp-dw-sheet {
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.mp-dw-education {
    box-sizing: border-box;
    margin: 24px 0 32px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.mp-dw-education + .mp-dw-setup {
    margin-top: 0;
}

.mp-dw-eyebrow {
    color: #6556ed;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.04em;
    line-height: 1.4;
    text-transform: uppercase;
}

.mp-dw-education h2 {
    margin-top: 8px;
}

.mp-dw-education-lead {
    max-width: 42rem;
    margin-top: 8px;
    color: #334155;
}

.mp-dw-education-grid {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.mp-dw-education-grid article {
    min-width: 0;
}

.mp-dw-education-grid h3 {
    font-size: 16px;
    line-height: 1.3;
}

.mp-dw-education-grid p {
    margin-top: 8px;
    color: #334155;
}

.mp-dw-education-note {
    margin-top: 24px;
    padding: 16px;
    border-radius: 8px;
    background: #f6f7fa;
    color: #334155;
    font-size: 14px;
}

.mp-dw-setup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    margin-top: 24px;
    padding: 24px;
}

.mp-dw-setup h2,
.mp-dw h2 {
    font-size: 20px;
    line-height: 1.3;
}

.mp-dw-setup a,
.mp-dw-card a,
.mp-dw-secondary a,
.mp-dw-follow a,
.mp-dw-text-button,
.mp-dw-hidden-note button {
    color: #312e81;
    font-weight: 650;
}

.mp-dw-setup > div,
.mp-dw-setup-price {
    min-width: 0;
    max-width: 100%;
}

.mp-dw-setup-price {
    display: grid;
    gap: 8px;
    justify-items: end;
    font-weight: 400;
    text-align: end;
}

.mp-dw-amount,
.mp-dw-price [data-field="price"] {
    font-weight: 700;
}

.mp-dw-price {
    display: grid;
    gap: 8px;
    font-weight: 400;
}

.mp-dw-price [data-field="period"]:empty,
.mp-dw-period:empty,
.mp-dw-tax:empty {
    display: none;
}

.mp-dw-tax,
.mp-dw-note,
.mp-dw-reason,
.mp-dw-charge,
.mp-dw-terms p {
    color: #334155;
    font-size: 16px;
    font-weight: 400;
}

.mp-dw-layout {
    margin-top: 24px;
}

.mp-dw-controls {
    display: grid;
    gap: 8px;
}

.mp-dw-search,
.mp-dw-filters button,
.mp-dw-button,
.mp-dw-radio,
.mp-dw-icon-button,
.mp-dw-card a,
.mp-dw-text-button {
    min-height: 44px;
}

.mp-dw-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    color: #0f172a;
    font: inherit;
}

.mp-dw-search::placeholder {
    color: #64748b;
    opacity: 1;
}

.mp-dw-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mp-dw-filters button {
    padding: 8px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #334155;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.mp-dw-filters button[aria-pressed="true"] {
    border-bottom-color: #4f46e5;
    color: #0f172a;
    font-weight: 700;
}

.mp-dw-heading {
    display: flex;
    gap: 16px;
    align-items: baseline;
    justify-content: space-between;
    margin: 24px 0 8px;
}

.mp-dw-status {
    margin-bottom: 24px;
    color: #334155;
}

.mp-dw-refresh,
.mp-dw-fetch-error,
.mp-dw-hidden-note,
.mp-dw-empty {
    margin-bottom: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.mp-dw-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.mp-dw-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 24px;
    height: 100%;
    padding: 24px;
}

.mp-dw-card.is-selected {
    border-color: #4f46e5;
    box-shadow: inset 0 0 0 1px #4f46e5;
}

.mp-dw-card img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: #fff;
}

.mp-dw-card-copy {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mp-dw-card-copy > * + * {
    margin-top: 8px;
}

.mp-dw-card-copy,
.mp-dw-choice,
.mp-dw-main,
.mp-dw-summary,
.mp-dw-sheet,
.mp-dw-sheet-body {
    min-width: 0;
    max-width: 100%;
}

.mp-dw-card h3 {
    font-size: 18px;
    line-height: 1.3;
}

.mp-dw-responsibility {
    color: #334155;
    font-weight: 650;
}

.mp-dw-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

.mp-dw-card-copy > .mp-dw-card-actions {
    margin-top: auto;
    padding-top: 8px;
}

.mp-dw-radio {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    max-width: 100%;
    cursor: pointer;
}

.mp-dw-radio input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    accent-color: #4f46e5;
}

.mp-dw-radio input:enabled {
    border-color: #64748b;
}

.mp-dw-radio input:enabled:checked {
    border-color: #4f46e5;
}

.mp-dw-choice {
    display: block;
    width: 100%;
}

.mp-dw-summary {
    margin-top: 24px;
    padding: 24px;
}

.mp-dw-choice > * + * {
    margin-top: 24px;
}

.mp-dw-selection,
.mp-dw-totals,
.mp-dw-total,
.mp-dw-enquiry,
.mp-dw-aside-links {
    display: grid;
    gap: 8px;
}

.mp-dw-selection:not(:has([data-bind="team-count"]:not(:empty), [data-team]:not([hidden]))) {
    display: none;
}

.mp-dw-totals {
    gap: 24px;
}

.mp-dw-kicker {
    color: #334155;
    font-weight: 650;
}

.mp-dw-onetime,
.mp-dw-period {
    color: #334155;
    font-weight: 400;
}

.mp-dw-choice .mp-dw-button,
.mp-dw-choice .mp-dw-secondary,
.mp-dw-choice .mp-dw-note {
    margin-top: 0;
}

.mp-dw-button[data-add] {
    display: none !important;
}

.mp-dw-terms summary {
    min-height: 44px;
    color: #312e81;
    font-weight: 650;
    cursor: pointer;
}

.mp-dw-terms summary + p,
.mp-dw-terms p + p {
    margin-top: 8px;
}

.mp-dw-choice-name:empty {
    display: none;
}

.mp-dw-team {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mp-dw-team li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.mp-dw-team li:first-child {
    margin-top: 0;
}

.mp-dw-team button {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #312e81;
    font: inherit;
    cursor: pointer;
}

.mp-dw-team button svg {
    display: block;
    width: 20px;
    height: 20px;
}

.mp-dw-button {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 7px;
    background: #4f46e5;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.mp-dw-button:hover {
    background: #4338ca;
}

.mp-dw-button:disabled,
.mp-dw-button[aria-disabled="true"] {
    background: #e2e8f0;
    color: #334155;
    cursor: not-allowed;
}

.mp-dw-text-button,
.mp-dw-icon-button,
.mp-dw-hidden-note button {
    padding: 8px 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.mp-dw-secondary,
.mp-dw-follow p {
    margin-top: 8px;
}

.mp-dw-secondary span,
.mp-dw-follow span {
    display: block;
    color: #334155;
}

.mp-dw-follow {
    display: none;
}

.mp-dw-bar {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 12rem);
    gap: 12px;
    align-items: center;
    box-sizing: border-box;
    max-width: 100%;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.mp-dw-bar > div {
    min-width: 0;
}

.mp-dw-bar .mp-dw-button {
    width: 100%;
    margin-top: 0;
    white-space: normal;
}

.mp-dw-sheet {
    width: min(640px, 100%);
    max-height: min(85dvh, 100%);
    margin: auto 0 0;
    padding: 0;
    border-radius: 16px 16px 0 0;
}

.mp-dw-sheet::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.mp-dw-sheet-bar,
.mp-dw-sheet-body {
    padding: 16px;
}

.mp-dw-sheet-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.mp-dw-sheet-body {
    overflow: auto;
    max-height: calc(85dvh - 76px);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

.mp-dw-steps,
.mp-dw-faq {
    margin-top: 32px;
}

.mp-dw-steps ol {
    display: grid;
    gap: 16px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.mp-dw-step-index {
    display: block;
    color: #4f46e5;
    font-weight: 700;
}

.mp-dw-step-title {
    margin-top: 4px;
}

.mp-dw-step-copy {
    margin-top: 8px;
    color: #334155;
}

.mp-dw-faq details {
    border-top: 1px solid #e2e8f0;
}

.mp-dw-faq summary {
    min-height: 44px;
    padding: 12px 0;
    font-weight: 650;
    cursor: pointer;
}

.mp-dw :focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

.mp-dw-hero :focus-visible {
    outline-color: #fff;
}

.mp-dw-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 767px) {
    #html-body.catalog-category-view.mp-digital-workers {
        padding-bottom: var(--mp-dw-bar-height);
    }

    #html-body.catalog-category-view.mp-digital-workers .breadcrumbs,
    .mp-dw-wrap {
        padding-inline: 16px;
    }

    .mp-dw h1 {
        font-size: 32px;
    }

    .mp-dw-setup {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .mp-dw-setup-price {
        justify-items: start;
        text-align: start;
    }

    .mp-dw-summary {
        display: none;
    }

    .mp-dw-follow {
        display: block;
        margin-top: 24px;
    }
}

@media (min-width: 768px) {
    .mp-dw-bar {
        display: none;
    }

    .mp-dw-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-dw-card {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .mp-dw-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .mp-dw-education {
        padding: 32px;
    }

    .mp-dw-education-grid,
    .mp-dw-steps ol {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .mp-dw-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 400px;
        gap: 24px;
        align-items: start;
    }

    .mp-dw-summary {
        position: sticky;
        /* .page-header is not sticky; #header is position: relative in mp-shell.css. */
        top: 16px;
        width: 100%;
        margin-top: 0;
    }
}

@media (min-width: 1440px) {
    .mp-dw-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

html.mp-dw-sheet-open,
html.mp-dw-sheet-open body {
    overflow: hidden;
}

/* Selected-member identity and fee stay on separate lines in the narrow summary. */
.mp-dw-team li > span > span:first-child { display: block; font-weight: 650; }
.mp-dw-team li > span > span:nth-child(2) { display: none; }
.mp-dw-team li > span > span:last-child { display: block; color: #334155; font-size: 14px; }
