/* Explicit resource selection, guided editing, and exact final review. */
.setup-resources-card.resource-flow {
    padding-bottom: 128px;
}

.resource-flow [hidden] {
    display: none !important;
}

.resource-flow h2 {
    margin: 0 0 10px;
    font-size: clamp(23px, 2.5vw, 30px);
    line-height: 1.2;
    color: var(--setup-ink);
}

.resource-flow section > p {
    color: var(--setup-muted);
    max-width: 76ch;
    line-height: 1.6;
}

.resource-flow-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #087b80;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.resource-suggestions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0 12px;
}

.resource-suggestion {
    display: grid;
    grid-template-columns: 22px 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 94px;
    padding: 18px;
    border: 1px solid var(--setup-line);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}

.resource-suggestion:has(input:checked) {
    border-color: #087b80;
    background: #effaf8;
    box-shadow: 0 0 0 2px #087b8020;
}

.resource-suggestion:focus-within {
    outline: 3px solid #087b80;
    outline-offset: 3px;
}

.setup-card .resource-suggestion input {
    width: 20px;
    height: 20px;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
    accent-color: #087b80;
}

.resource-suggestion-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #087b80;
    background: #edf8f7;
    border-radius: 10px;
    font-size: 22px;
}

.resource-suggestion-icon svg {
    width: 24px;
    height: 24px;
}

.resource-suggestion strong {
    font-size: 15px;
    overflow-wrap: anywhere;
}

.resource-flow-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.resource-flow .resource-flow-buttons .btn {
    min-height: 48px;
    white-space: normal;
    text-align: center;
}

.setup-resources-card.resource-flow .setup-resource-row {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
    gap: 22px 24px;
    margin-top: 22px;
    padding: 24px;
}

.resource-flow .setup-resource-row-heading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--setup-line);
    padding-bottom: 16px;
}

.resource-flow .setup-resource-row-heading strong {
    overflow-wrap: anywhere;
    min-width: 0;
    font-size: 17px;
}

.setup-resources-card.resource-flow .setup-resource-row .setup-resource-icon {
    flex: 0 0 44px;
    margin: 0;
    align-self: center;
}

.setup-resources-card.resource-flow .setup-resource-row .setup-remove-resource {
    margin: 0 0 0 auto;
    flex: 0 0 40px;
    align-self: center;
}

.resource-question-number {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-right: 6px;
    border-radius: 50%;
    background: #e9f5f4;
    color: #087b80;
    font-size: 12px;
}

.resource-flow .setup-resource-row label, .resource-flow .setup-resource-row legend {
    line-height: 1.5;
}

.resource-flow .setup-resource-booking {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    grid-column: 1;
}

.resource-flow .setup-resource-booking legend {
    padding: 0;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 800;
    color: var(--setup-ink);
}

.resource-flow .setup-resource-capacity {
    grid-column: 2;
    padding-top: 2px;
}

.resource-booking-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    margin-bottom: 8px;
    border: 1px solid var(--setup-line);
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
}

.resource-booking-choice:has(input:checked) {
    border-color: #087b80;
    background: #effaf8;
}

.resource-booking-choice:focus-within {
    outline: 2px solid #087b80;
    outline-offset: 2px;
}

.setup-card .resource-booking-choice input {
    width: 18px;
    height: 18px;
    /* Keep native radios independent of the shared text-field minimum height. */
    min-height: 0;
    flex: 0 0 18px;
    margin: 0;
    padding: 0;
    accent-color: #087b80;
    box-shadow: none;
}

.resource-booking-more {
    margin-top: 12px;
}

.resource-booking-more summary {
    cursor: pointer;
    color: #087b80;
    min-height: 38px;
    font-size: 13px;
    font-weight: 700;
}

.resource-flow small {
    display: block;
    line-height: 1.55;
    margin-top: 8px;
}

.resource-flow [data-capacity-help], .resource-flow [data-booking-help] {
    color: var(--setup-muted);
    font-size: 12px;
}

.setup-card.resource-flow .resource-field-error, .resource-flow .resource-field-error {
    color: #a62138;
    font-size: 13px;
    line-height: 1.5;
}

.setup-card.resource-flow .resource-field-warning {
    color: #805800;
    background: #fff9e7;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 12px;
}

.resource-flow [aria-invalid="true"] {
    border-color: #bd2944 !important;
}

.resource-restored-note {
    padding: 12px 16px;
    border-radius: 12px;
    background: #effaf8;
}

.resource-review-workspace {
    display: grid;
    gap: 6px;
    margin: 22px 0;
    padding: 18px;
    background: #effaf8;
    border-radius: 14px;
}

.resource-review-workspace span {
    color: var(--setup-muted);
    font-size: 12px;
}

.resource-review-workspace strong {
    font-size: 20px;
    overflow-wrap: anywhere;
}

.resource-review-list {
    display: grid;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 22px 0;
}

.resource-review-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--setup-line);
    border-radius: 14px;
    background: #fff;
}

.resource-review-list strong {
    display: block;
    overflow-wrap: anywhere;
}

.resource-review-list small {
    color: var(--setup-muted);
}

.resource-review-edit {
    flex-shrink: 0;
    border: 1px solid #bed8d9;
    border-radius: 10px;
    color: #087b80;
    background: #fff;
    min-height: 44px;
    padding: 10px 16px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.resource-flow .setup-actions {
    width: min(100%, 1000px);
}

.resource-flow .setup-actions .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.4;
}

.resource-flow .setup-actions [data-create-final] {
    max-width: 48ch;
}

.resource-flow :is(button, h2):focus-visible {
    outline: 3px solid #087b80;
    outline-offset: 4px;
}

@media (max-width: 760px) {
    .setup-resources-card.resource-flow {
        padding-bottom: 180px;
    }

    .resource-suggestions {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .resource-suggestion {
        padding: 14px;
        min-height: 80px;
    }

    .setup-resources-card.resource-flow .setup-resource-row {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
        gap: 20px;
    }

    .resource-flow .setup-resource-row > .form-row, .resource-flow .setup-resource-booking, .resource-flow .setup-resource-capacity {
        grid-column: 1;
    }

    .resource-flow .setup-resource-row-heading {
        grid-column: 1;
    }

    .resource-flow-buttons {
        align-items: stretch;
        flex-direction: column;
    }

    .resource-review-list li {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }

    .resource-flow .setup-actions {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .resource-flow .setup-actions [data-create-final] {
        font-size: 13px;
    }

}

/* Keep the optional exit visible without competing with the primary action. */
.resource-skip {
    margin: 24px 0;
}

.resource-skip button {
    white-space: normal;
    text-align: left;
    max-width: 100%;
}

.resource-skip small {
    max-width: 76ch;
    color: var(--setup-muted);
}
