/* Final dark appearance policy. Important declarations are isolated in a layer
 * so older component !important button skins cannot restore pink/white chrome.
 * Selected tabs, radios and status colors keep their separate meaning. */
@layer floweralba-dark-controls {
  @media (max-width: 1200px) {
    html[data-floweralba-theme="dark"] :where(
      .flower-account-ui .flower-button:not(.flower-button--danger),
      .flower-account-ui .job-dashboard-actions a.button,
      .flower-account-ui .flower-listing-detail .flower-listing-actions .job-dashboard-actions > li > a,
      .flower-account-ui .floweralba-title-emphasis-row__button,
      .flower-member-profile-ui button[type="submit"],
      .flower-member-profile-ui input[type="submit"],
      .floweralba-login-box button[type="submit"],
      .floweralba-login-box input[type="submit"],
      .cmca-login-card button[type="submit"],
      .cmca-login-card input[type="submit"],
      .cmca-gate .cmca-action:not(.cmca-action-disabled),
      .flower-board__button:not(.flower-board__button--danger):not(.flower-board__button--report),
      .flower-board .comments-submit-button button,
      .flower-board .comments-submit-button input,
      .flower-community-action:not(.is-active),
      .flower-notification-panel__read-all,
      .flower-notification-panel__retry,
      .flower-community-members--login a,
      .flower-community-guest-quota a,
      body.single-job_listing .listing-main-buttons .lmb-calltoaction > a,
      .floweralba-chat-start,
      .floweralba-chat-compose > button,
      .floweralba-chat-primary,
      .floweralba-chat-login a,
      .floweralba-chat-fatal button,
      .fac-play .fac-button,
      .fac-result-actions button,
      .fac-ai-prompts button,
      .floweralba-editor__upload-choose,
      .floweralba-editor__link-panel button[type="submit"],
      .floweralba-title-emphasis__submit,
      .floweralba-title-emphasis__cancel,
      .floweralba-title-emphasis__upgrade,
      .floweralba-ad-guide-button,
      .floweralba-ad-guide-product-cta,
      .floweralba-ad-change__footer button:not(.is-cancel-request),
      .floweralba-ad-change__success button,
      .fa-resume-app .fr-primary:not([data-action="delete-confirm"]),
      .fa-resume-app .fr-secondary:not([data-action="delete-confirm"]),
      .floweralba-mobile-menu__auth-links a
    ) {
      background: var(--fa-dm-button, #3b3f45) !important;
      border-color: var(--fa-dm-button, #3b3f45) !important;
      color: var(--fa-dm-button-text, #e6e6e6) !important;
      box-shadow: none !important;
    }
    html[data-floweralba-theme="dark"] :is(.flower-account-ui .flower-button:not(.flower-button--danger), .flower-account-ui .job-dashboard-actions a.button, .flower-account-ui .floweralba-title-emphasis-row__button, .flower-board__button:not(.flower-board__button--danger):not(.flower-board__button--report), .floweralba-ad-guide-button, .floweralba-ad-guide-product-cta, .floweralba-title-emphasis__submit, .floweralba-title-emphasis__cancel, .floweralba-ad-change__footer button:not(.is-cancel-request)):is(:hover, :focus-visible):not(:disabled):not([aria-disabled="true"]) {
      background: #474c54 !important;
      border-color: #474c54 !important;
      color: #fff !important;
    }
    html[data-floweralba-theme="dark"] .flower-account-ui .flower-listing-detail .job-dashboard-actions > li > a {
      color: #f2f3f6 !important;
    }
    html[data-floweralba-theme="dark"] :is(.flower-account-ui .flower-button, .flower-account-ui .floweralba-title-emphasis-row__button, .flower-board__button, .floweralba-title-emphasis__submit, .floweralba-ad-change__footer button):is(:disabled, [aria-disabled="true"]) {
      background: #30343a !important;
      border-color: #30343a !important;
      color: #abb2bf !important;
    }
    html[data-floweralba-theme="dark"] .floweralba-home-bottom-info .floweralba-home-bottom-info-link {
      background: transparent !important;
      color: #fff !important;
      box-shadow: none !important;
    }
    html[data-floweralba-theme="dark"] .c27-main-header .flower-notification-badge {
      border-color: transparent !important;
      box-shadow: none !important;
    }
    html[data-floweralba-theme="dark"] #c27-explore-listings .close-filters-27 > i {
      opacity: 1 !important;
    }
    /* Post utilities belong to the article surface; their selected text/icon
     * states remain distinct without the generic filled button treatment. */
    html[data-floweralba-theme="dark"] .flower-board--profile-community .flower-board-document__secondary-actions :is(.flower-community-action, .flower-board__button--report) {
      background: transparent !important;
      border-color: transparent !important;
      box-shadow: none !important;
    }
    html[data-floweralba-theme="dark"] .flower-board--profile-community .flower-board-document__secondary-actions .flower-community-action:is(.is-active, :hover, :focus-visible) {
      color: var(--fa-dm-accent) !important;
    }
    html[data-floweralba-theme="dark"] .flower-board--profile-community .flower-board-document__secondary-actions .flower-community-action--danger:is(:hover, :focus-visible) {
      color: var(--fa-dm-danger) !important;
    }
    html[data-floweralba-theme="dark"] .flower-board--profile-community .flower-board__reaction:not(.is-active) {
      color: #d5d5d5 !important;
    }
    html[data-floweralba-theme="dark"] .flower-board--profile-community .flower-board__reaction:not(.is-active):is(:hover, :focus-visible) {
      color: #fff !important;
    }
  }
}

@media (max-width: 1200px) {
  /* Only neutral reading markup is adapted. Saved colors/backgrounds and
   * palette classes cause the JS adapter to retain the original light canvas. */
  html[data-floweralba-theme="dark"] :is(.flower-board-document__content, .flower-board .comments-list-content, body.single-job_listing .element.content-block.wp-editor-content > .pf-body).floweralba-rich-content--plain {
    background-color: var(--fa-dm-surface) !important;
    color: var(--fa-dm-text) !important;
    color-scheme: dark;
  }
  html[data-floweralba-theme="dark"] :is(.flower-board-document__content, .flower-board .comments-list-content, body.single-job_listing .element.content-block.wp-editor-content > .pf-body).floweralba-rich-content--plain :is(p, div, span, font, h1, h2, h3, h4, h5, h6, li, blockquote, td, th, pre, code, strong, b, em, i, small) {
    color: inherit !important;
  }
  html[data-floweralba-theme="dark"] :is(.flower-board-document__content, .flower-board .comments-list-content, body.single-job_listing .element.content-block.wp-editor-content > .pf-body).floweralba-rich-content--plain a {
    color: var(--fa-dm-accent) !important;
  }
  html[data-floweralba-theme="dark"] :is(.flower-board-document__content, .flower-board .comments-list-content, body.single-job_listing .element.content-block.wp-editor-content > .pf-body).floweralba-rich-content--plain :is(table, thead, tbody, tr, td, th) {
    background-color: transparent;
    border-color: var(--fa-dm-border);
  }
  html[data-floweralba-theme="dark"] :is(.flower-board-document__content, .flower-board .comments-list-content, body.single-job_listing .element.content-block.wp-editor-content > .pf-body).floweralba-rich-content--authored,
  html[data-floweralba-theme="dark"] :is(.flower-board-document__content, .flower-board .comments-list-content, body.single-job_listing .element.content-block.wp-editor-content > .pf-body):not(.floweralba-rich-content--plain):not(.floweralba-rich-content--authored) {
    --flower-board-text: #242429;
    --flower-board-muted: #626875;
    --flower-board-surface: #fff;
    --flower-board-surface-soft: #f5f6f8;
    --floweralba-editor-text: #242429;
    --floweralba-editor-muted: #626875;
    --floweralba-editor-surface: #fff;
    background-color: #fff;
    color: #444953;
    color-scheme: light;
  }
}
