/* One icon accent across both panel shells and their dynamically loaded views.
   Match icon elements explicitly: chart series, logos, ads and QR codes retain
   their own artwork. Status labels keep their existing meaning. */
:is(body.panel-design, body.login-page, body.panel-launch-page) {
    --bc-icon-color: #8C5CFC;
    --bc-icon-surface: #F6F2FE;
    --bc-icon-border: #E9E3FD;
}

:is(body.panel-design, body.login-page, body.panel-launch-page) :is(
    .fa, .fas, .far, .fab, .fal, .fad, .fat,
    .fa-solid, .fa-regular, .fa-brands, .fa-light, .fa-duotone, .fa-thin,
    .sidebar-icon, .client-user-icon,
    .bgc-stat-icon-wrap, .email-stat-icon, .email-address-icon,
    .stat-icon, .stat-icon-modern, .stat-icon-simple, .wp-stat-icon, .wp-wp-stat-icon,
    .quick-action-icon, .activity-icon, .account-name-icon, .database-name-icon,
    .database-icon, .db-row-icon, .db-create-success-icon, .wordpress-icon,
    .website-domain-icon, .dns-domain-icon, .system-icon, .info-icon,
    .resource-icon, .kpi-card-icon, .apps-kind-icon, .ai-brand-icon, .ai-empty-icon,
    .dc-node-icon, .ipm-heading-icon, .ipm-stat-icon, .ipm-empty-icon,
    .logs-state-icon, .sftp-icon, .sftp-security-icon, .state-card__icon,
    .bgc-empty-icon, .empty-icon, .empty-state-icon, .process-loading-icon,
    .client-support-icon, .crown-icon, .support-department-icon, .support-contact-icon,
    .file-kind, .field-icon, .promo-icon
) {
    color: var(--bc-icon-color) !important;
    -webkit-text-fill-color: var(--bc-icon-color) !important;
}

/* Solid-colour masks inherit the same accent as font and line icons. */
body.panel-design :is(.sidebar-icon, .client-user-icon, .sftp-icon, .sftp-security-icon) {
    background-color: var(--bc-icon-color) !important;
}
body.panel-design .user-avatar::before {
    color: var(--bc-icon-color) !important;
    -webkit-text-fill-color: var(--bc-icon-color) !important;
}

/* Remove green/amber/blue backplates and gradients from overview icons. */
body.panel-design :is(
    .bgc-stat-icon-wrap, .email-stat-icon, .email-address-icon,
    .stat-icon, .stat-icon-modern, .stat-icon-simple, .wp-stat-icon, .wp-wp-stat-icon,
    .quick-action-icon, .activity-icon, .account-name-icon, .database-name-icon,
    .db-row-icon, .db-create-success-icon, .apps-kind-icon, .ai-brand-icon,
    .wordpress-icon, .database-icon, .website-domain-icon, .dns-domain-icon,
    .system-icon, .info-icon, .resource-icon, .kpi-card-icon, .promo-icon,
    .dc-node-icon, .ipm-heading-icon, .ipm-stat-icon, .ipm-empty-icon,
    .logs-state-icon, .state-card__icon, .client-support-icon,
    .support-department-icon, .support-contact-icon
) {
    background: var(--bc-icon-surface) !important;
    border-color: var(--bc-icon-border) !important;
}

/* Inline icon SVGs use currentColor; transparent fills and line geometry stay
   intact. Chart SVGs do not match these selectors. */
body.panel-design :is(svg[aria-hidden="true"], svg.icon, svg[class$="-icon"]) {
    color: var(--bc-icon-color) !important;
}
body.panel-design :is(svg[aria-hidden="true"], svg.icon, svg[class$="-icon"]) [fill]:not([fill="none"]):not([fill^="url("]) {
    fill: var(--bc-icon-color) !important;
}
body.panel-design :is(svg[aria-hidden="true"], svg.icon, svg[class$="-icon"])[stroke]:not([stroke="none"]),
body.panel-design :is(svg[aria-hidden="true"], svg.icon, svg[class$="-icon"]) [stroke]:not([stroke="none"]) {
    stroke: var(--bc-icon-color) !important;
}

/* Coloured icon-only action tiles use the same pale surface as other icons. */
body.panel-design :is(.wp-btn-icon, .user-btn-icon, .db-btn-icon, .icon-btn, .btn-icon, .dns-icon-button) {
    color: var(--bc-icon-color) !important;
    background: var(--bc-icon-surface) !important;
    border-color: var(--bc-icon-border) !important;
}

/* Filled action icons inherit the label color; decorative icons keep the purple accent. */
:is(body.panel-design, body.login-page) :is(
    .btn--primary, .btn-primary, .wp-btn-primary, .bgc-btn-primary, .user-btn-primary,
    .btn--accent, .btn--gradient, .wp-btn-accent, .wp-btn-php, .wp-btn-clone,
    .wp-btn-success, .wp-btn-danger, .wp-btn-warning, .wp-btn-info,
    .btn--danger, .btn-danger, .bgc-btn-danger, .login-submit,
    .apps-btn--primary, .ipm-btn--primary, .mphp-btn--primary, .svc-btn--primary,
    .toast, .wp-toast, .notification
) > :is(.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 1em;
    height: 1em;
    padding: 0;
    box-sizing: border-box;
    border-radius: 4px;
    background: transparent !important;
    color: inherit !important;
    -webkit-text-fill-color: currentColor !important;
}

/* The mobile overview uses the same solid accent as the desktop artwork. */
body.panel-design .client-home-stat-art { opacity: 1 !important; }

/* Text-based close/menu controls and form arrows are icons too. */
:is(body.panel-design, body.login-page) :is(
    .modal-close, .wp-modal-close, .db-create-close, .notification-close,
    .users-actions-trigger, .action-menu-trigger, .dropdown-toggle,
    .login-eye, .client-notification-header > button, .file-actions summary
) { color: var(--bc-icon-color) !important; }
:is(body.panel-design, body.login-page) select:not([multiple]):not([size]) {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m3 5 4 4 4-4' stroke='%238C5CFC' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-size: 14px 14px !important;
    background-position: right 12px center !important;
    padding-right: 34px;
}
