/* Client account surfaces.  Text on a surface uses the calculated readable
   ink, which remains visible even when the saved text and surface match. */

/* Sign-in, registration and password recovery. Provider logos and errors
   retain their own semantic/brand colours. */
.site-content .register-card,
.site-content .registration-consents,
.site-content .profile-password-card,
.site-content .profile-password-alternative-form {
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-card-radius) !important;
    color: var(--site-surface-ink) !important;
    background: var(--site-surface) !important;
    box-shadow: var(--site-card-shadow) !important;
}

.site-content .register-card :is(h1, h2, h3, p, label, legend, small),
.site-content .profile-password-card :is(h1, h2, h3, label, legend),
.site-content .profile-password-intro,
.site-content .profile-password-help,
.site-content .profile-password-help li,
.site-content .profile-password-resend [data-password-code-countdown] {
    color: var(--site-surface-ink) !important;
}

.site-content :is(.login-link a, .forgot-password-link a,
    .profile-password-back, .profile-password-alternative-toggle,
    .profile-section-kicker, .profile-password-resend-button) {
    color: var(--site-accent-readable) !important;
}

.site-content :is(.register-card .gold-btn, .profile-password-card .gold-btn) {
    border: 1px solid var(--site-primary) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-primary-contrast) !important;
    background: var(--site-primary) !important;
}

.site-content :is(.register-card .gold-btn, .profile-password-card .gold-btn):hover {
    color: var(--site-primary-hover-contrast) !important;
    background: var(--site-primary-hover) !important;
}

.site-content :is(.social-auth__divider, .social-auth__button,
    .registration-consents .consent-row label) {
    color: var(--site-surface-ink) !important;
}

.site-content .register-card .social-auth__divider > span {
    color: var(--site-muted-surface-ink) !important;
}

.site-content .social-auth__button {
    border-color: var(--site-border) !important;
    border-radius: var(--site-button-radius) !important;
    background: var(--site-surface) !important;
}

/* Profile and connected-account blocks. */
.site-content .profile-page :is(.profile-sidebar, .profile-content,
    .profile-login-links, .profile-login-link, .profile-calendar-sync,
    .profile-calendar-sync__card, .profile-max, .profile-document-card,
    .profile-phone-confirm, .avatar-menu),
.profile-legal-documents-dialog :is(.profile-legal-document,
    .profile-legal-document-text) {
    border-color: var(--site-border) !important;
    color: var(--site-surface-ink) !important;
    background: var(--site-surface) !important;
}

.site-content .profile-page :is(h1, h2, h3, label, p, small,
    .profile-rating-label, .profile-login-link-title h3,
    .profile-login-link-content p, .profile-login-link-content small,
    .profile-max > div > p:last-child,
    .profile-calendar-sync__card p),
.profile-legal-documents-dialog :is(h2, h3, p, summary, small,
    .profile-legal-document-text, .profile-legal-document-text *) {
    color: var(--site-surface-ink) !important;
}

.profile-legal-documents-dialog :is(.profile-legal-documents-heading p,
    .profile-marketing-toggle, .profile-marketing-toggle span) {
    color: var(--site-surface-ink) !important;
}

.site-content .profile-page :is(.profile-rating-stars,
    .profile-section-kicker),
.profile-legal-documents-dialog .profile-legal-documents-heading > span,
.profile-legal-documents-dialog .profile-legal-document summary::after {
    color: var(--site-accent-readable) !important;
}

.site-content .profile-page :is(.profile-login-link-unavailable,
    .profile-calendar-sync__unavailable, .profile-documents-note,
    .profile-login-link-title > span, .profile-login-link-state,
    .profile-calendar-sync__state, .profile-email-pending,
    .profile-email-state, .readonly-field) {
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.site-content .profile-page :is(.profile-email-state *,
    .profile-documents-note *, .profile-login-link-title > span *,
    .profile-calendar-sync__state *) {
    color: inherit !important;
}

.site-content .profile-page :is(.profile-document-button,
    .profile-document-button span, .profile-document-button small) {
    color: var(--site-primary-contrast) !important;
}

.site-content .profile-page :is(.profile-login-link-unlink,
    .profile-calendar-sync__secondary, .profile-max-button--secondary,
    .avatar-menu button) {
    border-color: var(--site-border) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.site-content .profile-page :is(.profile-login-link-unlink,
    .profile-calendar-sync__secondary, .profile-max-button--secondary,
    .avatar-menu button):hover {
    border-color: var(--site-primary) !important;
    color: var(--site-primary-contrast) !important;
    background: var(--site-primary) !important;
}

.site-content .profile-page :is(.gold-btn, .profile-security-button,
    .profile-legal-documents-open, .profile-calendar-sync__primary,
    .profile-max-button:not(.profile-max-button--secondary),
    .profile-login-link > a) {
    color: var(--site-primary-contrast) !important;
    background: var(--site-primary) !important;
}

.profile-legal-documents-dialog :is(.profile-legal-document-text,
    .profile-legal-document-consent) {
    border-color: var(--site-border) !important;
    background: var(--site-surface) !important;
}

.profile-legal-documents-dialog .profile-legal-documents-close {
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

/* Both parts of client History. */
.site-content :is(.service-history-count, .service-history-filters,
    .service-history-card, .service-history-review-form,
    .service-history-review-state, .operation-history-count,
    .operation-receipt) {
    border-color: var(--site-border) !important;
    border-radius: var(--site-card-radius) !important;
    color: var(--site-surface-ink) !important;
    background: var(--site-surface) !important;
    box-shadow: var(--site-card-shadow) !important;
}

.site-content :is(.service-history-page, .operation-history-page)
    :where(h1, h2, h3, dt, dd, code, legend, label,
    .service-history-count span, .operation-history-count span,
    .service-history-count strong, .operation-history-count strong,
    .service-history-review-state strong, .operation-amount,
    .service-history-card > header > div > span,
    .operation-receipt > header span) {
    color: var(--site-surface-ink) !important;
}

.site-content :is(.service-history-page, .operation-history-page)
    :where(.service-history-heading p, .operation-history-heading p,
    .service-history-review-form > p, .service-history-review-state p,
    .service-history-review-text > span, .service-history-review-files > span,
    .service-history-card dd span:not(.service-history-payment)) {
    color: var(--site-surface-ink) !important;
}

.site-content :is(.service-history-heading, .operation-history-heading)
    :is(h1, p, span),
.site-content :is(.service-history-feedback:not(.is-error),
    .service-history-pagination span, .operation-history-pagination span,
    .service-history-waitlist > header span) {
    color: var(--site-background-ink) !important;
}

.site-content .service-history-status-filter > div,
.site-content .service-history-status-filter > summary,
.site-content .service-history-reset {
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-input-radius) !important;
    color: var(--site-surface-ink) !important;
    background: var(--site-surface) !important;
}

.site-content .service-history-filters > label > span {
    color: var(--site-muted-surface-ink) !important;
}

.site-content :is(.service-history-status-filter > div label,
    .service-history-paid-filter, .service-history-feedback:not(.is-error),
    .service-history-review-error:not(.is-error)) {
    color: var(--site-surface-ink) !important;
}

.site-content :is(.service-history-status-filter > div label,
    .service-history-paid-filter):hover,
.site-content .service-history-reset:hover {
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.site-content :is(.service-history-rating label,
    .service-history-review-stars) {
    color: var(--site-accent-readable) !important;
    opacity: .35;
}

.site-content :is(.service-history-rating label:hover,
    .service-history-rating label:hover ~ label,
    .service-history-rating input:checked ~ label,
    .service-history-review-stars .is-active) {
    color: var(--site-accent-readable) !important;
    opacity: 1;
}

.site-content :is(.service-history-loader button,
    .service-history-review-form button,
    .service-history-pay-button) {
    border: 1px solid var(--site-primary) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-primary-contrast) !important;
    background: var(--site-primary) !important;
}

.site-content :is(.service-history-review-button,
    .service-history-empty a, .service-history-pagination a,
    .operation-history-pagination a) {
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.site-content :is(.service-history-empty, .operation-history-empty) {
    border-color: var(--site-border) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.site-content :is(.service-history-empty, .operation-history-empty)
    :is(h2, p, div) {
    color: var(--site-background-ink) !important;
}

.site-content .service-history-card::before,
.site-content .operation-receipt::before {
    background: var(--site-accent) !important;
}

.site-content :is(.service-history-card > header,
    .operation-receipt > header, .service-history-paid-filter) {
    border-color: var(--site-border) !important;
}

.site-content .client-history-navigation__link:not(.is-active) {
    border-color: var(--site-border) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.site-content .client-history-navigation__link.is-active {
    border-color: var(--site-primary) !important;
    color: var(--site-primary-contrast) !important;
    background: var(--site-primary) !important;
}

/* Customer order list, detail, review and QR shell.  The QR itself must stay
   white so scanners can read it reliably. */
.site-content .market-orders--client .client-orders-hero {
    color: var(--site-background-ink) !important;
    background: linear-gradient(135deg, var(--site-background),
        color-mix(in srgb, var(--site-primary) 12%, var(--site-background))) !important;
}

.site-content .market-orders--client .client-orders-hero
    :where(h1, p, span, .client-orders-hero__icon) {
    color: var(--site-background-ink) !important;
}

.site-content .market-orders--client :is(.client-orders-qr,
    .order-filters, .order-card, .order-settings,
    .order-empty, .client-order-product,
    .order-product-review, .order-cancel-dialog) {
    border-color: var(--site-border) !important;
    color: var(--site-surface-ink) !important;
    background: var(--site-surface) !important;
}

.site-content .market-orders--client :is(.client-orders-qr,
    .order-filters, .order-card, .order-settings,
    .order-empty, .client-order-product,
    .order-product-review)
    :is(h1, h2, h3, p, label, legend, dt, dd, strong, small,
    .order-number, .order-refund, .client-order-product__receiving > span) {
    color: var(--site-surface-ink) !important;
}

.site-content .market-orders--client :is(.client-order-status-group > header > span,
    .client-order-detail-heading > span, .order-lazy-loader span,
    .client-order-status-group > header h2,
    .client-order-detail-heading h1) {
    color: var(--site-background-ink) !important;
}

.site-content .market-orders--client :is(.client-order-status-group > header > strong,
    .order-status, .client-order-payment, .order-review-state) {
    border: 1px solid var(--site-border) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-primary-contrast) !important;
    background: var(--site-primary) !important;
}

.site-content .market-orders--client :is(.order-status-sections a:not([aria-current="page"]),
    button:not(.order-primary):not([class*="cancel"]):not([class*="danger"]):not([class*="refund"]),
    .client-orders-qr-dialog > button) {
    border-color: var(--site-border) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.site-content .market-orders--client :is(.order-status-sections a[aria-current="page"],
    .order-primary, .client-orders-hero__actions > a) {
    border-color: var(--site-primary) !important;
    color: var(--site-primary-contrast) !important;
    background: var(--site-primary) !important;
}

.site-content .market-orders--client .client-orders-hero__actions > a > span {
    color: var(--site-primary-contrast) !important;
}

.site-content .market-orders--client .order-live-message:not(.is-error) {
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.client-orders-qr-dialog,
.client-orders-qr-dialog small {
    color: var(--site-surface-ink) !important;
    background: var(--site-surface) !important;
}

/* Payment outcomes and the payment-method chooser. Status/error icons and
   payment-provider marks remain semantically distinctive. */
.site-content :is(.payment-result, .certificate-payment-result,
    .email-confirmation-card),
.client-payment-method-dialog {
    border-color: var(--site-border) !important;
    color: var(--site-surface-ink) !important;
    background: var(--site-surface) !important;
}

.site-content :is(.payment-result, .certificate-payment-result,
    .email-confirmation-card) :is(h1, h2, p, strong, span):not([class*="icon"]):not([class*="error"]),
.client-payment-method-dialog :is(h2, h3, p, strong, small) {
    color: var(--site-surface-ink) !important;
}

.site-content :is(.payment-result__details, .certificate-payment-result__details,
    .payment-result__details > div),
.client-payment-method-list > button {
    border-color: var(--site-border) !important;
    color: var(--site-surface-ink) !important;
    background: var(--site-surface) !important;
}

.site-content :is(.payment-result__primary,
    .certificate-payment-result__actions a:first-child,
    .email-confirmation-card a) {
    border-color: var(--site-primary) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-primary-contrast) !important;
    background: var(--site-primary) !important;
}

.site-content :is(.payment-result__secondary,
    .certificate-payment-result__actions a:not(:first-child)) {
    border-color: var(--site-border) !important;
    border-radius: var(--site-button-radius) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}

.client-payment-method-dialog .client-payment-method-close {
    border-color: var(--site-border) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}
/* Keep provider artwork unchanged while styling its surrounding badge. */
.site-content .profile-login-link-mark {
    border-color: var(--site-border) !important;
    color: var(--site-background-ink) !important;
    background: var(--site-background) !important;
}
