/* Final visual consistency layer for public-booking themes.
 * Loaded after page-specific styles so theme tokens remain authoritative.
 */

body[class*="pb-theme-"] .pb-service-meta div,
body[class*="pb-theme-"] .pb-summary-card dl > div,
body[class*="pb-theme-"] .pb-result-summary > div,
body[class*="pb-theme-"] .pb-payment-summary > div,
body[class*="pb-theme-"] .pb-section-block,
body[class*="pb-theme-"] .pb-date-card,
body[class*="pb-theme-"] .pb-time-chip,
body[class*="pb-theme-"] .pb-provider-card,
body[class*="pb-theme-"] .pb-progress,
body[class*="pb-theme-"] .pb-sticky-action,
body[class*="pb-theme-"] .pb-platform-footer,
body[class*="pb-theme-"] .pb-empty-state {
    border-color: var(--pb-border);
}

body[class*="pb-theme-"] .pb-service-meta div,
body[class*="pb-theme-"] .pb-summary-card dl > div,
body[class*="pb-theme-"] .pb-result-summary > div,
body[class*="pb-theme-"] .pb-payment-summary > div {
    background: var(--pb-surface-soft);
}

body[class*="pb-theme-"] .pb-section-block,
body[class*="pb-theme-"] .pb-date-card,
body[class*="pb-theme-"] .pb-time-chip,
body[class*="pb-theme-"] .pb-provider-card {
    background: var(--pb-surface);
}

body[class*="pb-theme-"] .pb-progress,
body[class*="pb-theme-"] .pb-sticky-action,
body[class*="pb-theme-"] .pb-platform-footer {
    background: color-mix(in srgb, var(--pb-surface) 82%, transparent);
}

body[class*="pb-theme-"] .pb-business-contact a,
body[class*="pb-theme-"] .pb-contact-button,
body[class*="pb-theme-"] .pb-back-link,
body[class*="pb-theme-"] .pb-about-button,
body[class*="pb-theme-"] .pb-secondary-button {
    border-color: var(--pb-border);
    color: var(--pb-text);
    background: color-mix(in srgb, var(--pb-surface) 72%, transparent);
}

body[class*="pb-theme-"] .pb-date-card.is-disabled {
    border-color: var(--pb-border);
    color: var(--pb-muted);
    background: var(--pb-surface-soft);
    opacity: .68;
}

body[class*="pb-theme-"] .pb-form-field input,
body[class*="pb-theme-"] .pb-form-field textarea,
body[class*="pb-theme-"] .booking-management-page .bm-form-control,
body[class*="pb-theme-"] .booking-management-page .up-form-control,
body[class*="pb-theme-"] .booking-management-page .ui-date-picker__trigger.ui-button {
    border-color: var(--pb-border-strong);
    color: var(--pb-text);
    background: color-mix(in srgb, var(--pb-surface) 78%, transparent);
}

body[class*="pb-theme-"] .pb-form-field input::placeholder,
body[class*="pb-theme-"] .pb-form-field textarea::placeholder,
body[class*="pb-theme-"] .booking-management-page .bm-form-control::placeholder,
body[class*="pb-theme-"] .booking-management-page .up-form-control::placeholder {
    color: var(--pb-muted);
    opacity: .78;
}

body[class*="pb-theme-"] .pb-business-modal__dialog {
    border-color: var(--pb-theme-border);
    color: var(--pb-text);
    background: var(--pb-bg-soft);
}

body[class*="pb-theme-"] .pb-business-modal__identity {
    border-bottom-color: var(--pb-border);
}

body[class*="pb-theme-"] .pb-business-modal__logo,
body[class*="pb-theme-"] .pb-business-modal__section,
body[class*="pb-theme-"] .pb-business-modal__contact,
body[class*="pb-theme-"] .pb-business-modal__address dl > div {
    border-color: var(--pb-border);
    background: var(--pb-surface);
}

body[class*="pb-theme-"] .pb-business-modal__services li,
body[class*="pb-theme-"] .pb-business-modal__contact-group,
body[class*="pb-theme-"] .pb-business-modal__empty {
    border-color: var(--pb-border);
    background: var(--pb-surface-soft);
}

body[class*="pb-theme-"] .pb-business-modal__empty {
    border-style: dashed;
}

body[class*="pb-theme-"] .pb-business-modal__backdrop {
    background: color-mix(in srgb, var(--pb-text) 46%, transparent);
}

body[class*="pb-theme-"] .booking-management-page .bm-action-disabled,
body[class*="pb-theme-"] .booking-management-page .bm-summary-grid > div,
body[class*="pb-theme-"] .booking-management-page .bm-notice,
body[class*="pb-theme-"] .booking-management-page .bm-request-sent-timeline > div,
body[class*="pb-theme-"] .booking-management-page .bm-request-sent-summary,
body[class*="pb-theme-"] .booking-management-page .ui-button {
    border-color: var(--pb-border);
}

body[class*="pb-theme-"] .booking-management-page .bm-action-disabled,
body[class*="pb-theme-"] .booking-management-page .bm-summary-grid > div,
body[class*="pb-theme-"] .booking-management-page .bm-notice,
body[class*="pb-theme-"] .booking-management-page .bm-request-sent-timeline > div,
body[class*="pb-theme-"] .booking-management-page .bm-request-sent-summary,
body[class*="pb-theme-"] .booking-management-page .ui-button {
    background: var(--pb-surface-soft);
}

body[class*="pb-theme-"] .booking-management-page .bm-notice--info {
    border-color: var(--pb-theme-border);
    background: linear-gradient(145deg, var(--pb-surface) 0%, var(--pb-theme-tint) 100%);
}

body[class*="pb-theme-"] .booking-management-page .ui-button:hover,
body[class*="pb-theme-"] .booking-management-page .ui-button:focus-visible {
    border-color: var(--pb-theme-border-strong);
    color: var(--pb-accent-strong);
    background: var(--pb-accent-soft);
}

body[class*="pb-theme-"] .pb-platform-footer a:hover,
body[class*="pb-theme-"] .pb-platform-footer a:focus-visible {
    color: var(--pb-accent-strong);
}

body[class*="pb-theme-"] .pb-business-modal__close:focus-visible {
    outline-color: rgba(255, 255, 255, .62);
}

@media (max-width: 700px) {
    body[class*="pb-theme-"] .pb-progress,
    body[class*="pb-theme-"] .pb-sticky-action,
    body[class*="pb-theme-"] .booking-management-page .bm-form-actions {
        border-color: var(--pb-border);
        background: color-mix(in srgb, var(--pb-surface) 88%, transparent);
    }
}

@supports not (background: color-mix(in srgb, white 50%, transparent)) {
    body[class*="pb-theme-"] .pb-progress,
    body[class*="pb-theme-"] .pb-sticky-action,
    body[class*="pb-theme-"] .pb-platform-footer,
    body[class*="pb-theme-"] .pb-business-contact a,
    body[class*="pb-theme-"] .pb-contact-button,
    body[class*="pb-theme-"] .pb-back-link,
    body[class*="pb-theme-"] .pb-about-button,
    body[class*="pb-theme-"] .pb-secondary-button,
    body[class*="pb-theme-"] .pb-form-field input,
    body[class*="pb-theme-"] .pb-form-field textarea,
    body[class*="pb-theme-"] .booking-management-page .bm-form-control,
    body[class*="pb-theme-"] .booking-management-page .up-form-control,
    body[class*="pb-theme-"] .booking-management-page .ui-date-picker__trigger.ui-button {
        background: var(--pb-surface);
    }

    body[class*="pb-theme-"] .pb-business-modal__backdrop {
        background: rgba(20, 20, 24, .5);
    }
}
