/* Shared brand-cyan actions across desktop, mobile and Admin.
   Important declarations in this named layer own only action colors, so legacy
   unlayered !important page rules cannot replace the approved brand treatment. */
:root {
  --brand-action-bg: #00aceb;
  --brand-action-hover: #00b3ee;
  --brand-action-active: #00a4e3;
  --brand-action-ink: #fff;
  --brand-action-gradient: linear-gradient(118deg, #00aceb 0%, #00aceb 62%, #19c8ee 100%);
  --brand-action-hover-gradient: linear-gradient(118deg, #00b3ee 0%, #00b3ee 62%, #24d2ee 100%);
  --brand-action-active-gradient: linear-gradient(118deg, #00a4e3 0%, #00a4e3 62%, #12bce8 100%);
  --brand-action-shadow: inset 0 1px 0 rgba(255,255,255,.48), 0 3px 10px rgba(0,172,235,.16);
}

@layer site-brand-actions {
  :is(button, a, input[type="submit"], [role="button"], .mh-product-cta):hover {
    --brand-action-state: var(--brand-action-hover);
    --brand-action-state-gradient: var(--brand-action-hover-gradient);
  }
  :is(button, a, input[type="submit"], [role="button"], .mh-product-cta):active {
    --brand-action-state: var(--brand-action-active);
    --brand-action-state-gradient: var(--brand-action-active-gradient);
  }

  :is(
    [data-brand-action="primary"], .ui-button--primary, .primary-btn, .btn-primary,
    .submit-btn, .comment-btn, .download-btn, .save-btn, .login-btn,
    .small-btn.primary, .nav-btn.primary, .filter-done-primary,
    .admin-page-action.primary, .admin-primary-btn, #save-btn,
    .account-primary-btn, .account-phone-btn, .ac-login-submit, .ac-btn.primary,
    .acs-btn-primary, .aos-submit, .bd-btn:not(.ghost), .demand-success-btn.primary,
    .login-prompt-btn-primary, .tools-pc-card__cta:not(.ui-button--secondary),
    .community-empty button, .community-sheet-actions button[type="submit"],
    .pv-send, .pv-login-btn, .pv-guest-btn, .pv-report-submit,
    .home-banner-slide__cta, .hm-card__cta, .hm-tool__cta, .hm-kb-hero__cta,
    .hm-coop__cta, .mh-product-cta, .search-product-view, .tool-entry-cta.ui-button--primary,
    .tools-pc-feedback__cta, .tools-dev-cta, .pc-empty-compose,
    .mobile-more-fab, .seo-brand-contact, .seo-back,
    .banner-search button, .hero-search button, .hero-search-form button,
    .news-search button, .kb-search button, .tools-search button,
    .forum-search button, .forum-search-submit, .community-search > button,
    .site-search-form button, .nf-search button,
    .gbq-search button:not(.mq-search-clear), .gbq-task-form button,
    .mq-search-form > button:not(.mq-search-clear), .mq-reader-primary,
    .ui-search > button[type="submit"], #news-manual-submit, #post-submit,
    #compare-toggle-btn, .pagination .active, .pager-actions button.active,
    .catalog-page-btn.active, .filter-toggle.active,
    .nf-categories button.is-active, .community-types button[aria-pressed="true"],
    .mobile-news-tabs button.active, .forum-pagination button.active,
    .gbq-type-switch button[aria-pressed="true"],
    .mq-result-filters button[aria-pressed="true"], .mq-outline-tabs button[aria-pressed="true"],
    body.mobile-page #category-filters .filter-chip.active,
    body.mobile-page #forum-topic-tabs button.active, body.mobile-page #forum-latest-tab.active,
    body.mobile-page #forum-post-sheet .tag-picker button.active,
    body.mobile-page #forum-post-sheet .tag-picker button[aria-pressed="true"],
    body[data-gb-reader] .gbq-query-tabs > a.active,
    body:not(.mobile-page) .forum-post-login-btn, #community-feed .pv-empty button
  ):not(.danger, .danger-btn, .is-danger, [data-variant="danger"]) {
    background: var(--brand-action-state, var(--brand-action-bg)) !important;
    background-image: var(--brand-action-state-gradient, var(--brand-action-gradient)) !important;
    border-color: var(--brand-action-state, var(--brand-action-bg)) !important;
    color: var(--brand-action-ink) !important;
    -webkit-text-fill-color: var(--brand-action-ink) !important;
    font-weight: 500 !important;
    box-shadow: var(--brand-action-shadow) !important;
  }

  /* Labels and currentColor icons share the white foreground, including WebKit fill. */
  :is(
    [data-brand-action="primary"], .ui-button--primary, .primary-btn, .btn-primary,
    .submit-btn, .comment-btn, .download-btn, .save-btn, .login-btn,
    .small-btn.primary, .nav-btn.primary, .filter-done-primary,
    .admin-page-action.primary, .admin-primary-btn, #save-btn,
    .account-primary-btn, .account-phone-btn, .ac-login-submit, .ac-btn.primary,
    .acs-btn-primary, .aos-submit, .bd-btn:not(.ghost), .demand-success-btn.primary,
    .login-prompt-btn-primary, .tools-pc-card__cta:not(.ui-button--secondary),
    .community-empty button, .community-sheet-actions button[type="submit"],
    .pv-send, .pv-login-btn, .pv-guest-btn, .pv-report-submit,
    .home-banner-slide__cta, .hm-card__cta, .hm-tool__cta, .hm-kb-hero__cta,
    .hm-coop__cta, .mh-product-cta, .search-product-view, .tool-entry-cta.ui-button--primary,
    .tools-pc-feedback__cta, .tools-dev-cta, .pc-empty-compose,
    .mobile-more-fab, .seo-brand-contact, .seo-back,
    .banner-search button, .hero-search button, .hero-search-form button,
    .news-search button, .kb-search button, .tools-search button,
    .forum-search button, .forum-search-submit, .community-search > button,
    .site-search-form button, .nf-search button,
    .gbq-search button:not(.mq-search-clear), .gbq-task-form button,
    .mq-search-form > button:not(.mq-search-clear), .mq-reader-primary,
    .ui-search > button[type="submit"], #news-manual-submit, #post-submit,
    #compare-toggle-btn, .pagination .active, .pager-actions button.active,
    .catalog-page-btn.active, .filter-toggle.active,
    .nf-categories button.is-active, .community-types button[aria-pressed="true"],
    .mobile-news-tabs button.active, .forum-pagination button.active,
    .gbq-type-switch button[aria-pressed="true"],
    .mq-result-filters button[aria-pressed="true"], .mq-outline-tabs button[aria-pressed="true"],
    body.mobile-page #category-filters .filter-chip.active,
    body.mobile-page #forum-topic-tabs button.active, body.mobile-page #forum-latest-tab.active,
    body.mobile-page #forum-post-sheet .tag-picker button.active,
    body.mobile-page #forum-post-sheet .tag-picker button[aria-pressed="true"],
    body[data-gb-reader] .gbq-query-tabs > a.active,
    body:not(.mobile-page) .forum-post-login-btn, #community-feed .pv-empty button
  ):not(.danger, .danger-btn, .is-danger, [data-variant="danger"]) :is(span, strong, b, em, i, svg) {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
  }
}
