/* Syncfusion buttons: neutral by default, petrol only for primary interaction. */
.e-btn,
.e-css.e-btn {
    border-color: var(--fc-border);
    background-color: var(--fc-surface);
    color: var(--fc-navy);
    box-shadow: none;
}

    .e-btn:hover:not([disabled]):not(.e-disabled),
    .e-css.e-btn:hover:not([disabled]):not(.e-disabled) {
        border-color: var(--fc-primary);
        background-color: var(--fc-primary-soft);
        color: var(--fc-primary);
    }

    .e-btn:focus:not([disabled]):not(.e-disabled),
    .e-btn:focus-visible:not([disabled]):not(.e-disabled),
    .e-css.e-btn:focus:not([disabled]):not(.e-disabled),
    .e-css.e-btn:focus-visible:not([disabled]):not(.e-disabled) {
        border-color: var(--fc-primary);
        box-shadow: var(--fc-focus-ring);
    }

    .e-btn.e-primary,
    .e-css.e-btn.e-primary,
    .e-btn.e-flat.e-primary,
    .e-css.e-btn.e-flat.e-primary,
    .e-footer-content .e-btn.e-primary.e-flat:not([disabled]):not(.e-success):not(.e-danger):not(.e-warning):not(.e-info) {
        border-color: var(--fc-primary);
        background-color: var(--fc-primary);
        color: #FFFFFF;
    }

        .e-btn.e-primary:hover:not([disabled]):not(.e-disabled),
        .e-css.e-btn.e-primary:hover:not([disabled]):not(.e-disabled),
        .e-btn.e-flat.e-primary:hover:not([disabled]):not(.e-disabled),
        .e-css.e-btn.e-flat.e-primary:hover:not([disabled]):not(.e-disabled),
        .e-footer-content .e-btn.e-primary.e-flat:hover:not([disabled]):not(.e-disabled):not(.e-success):not(.e-danger):not(.e-warning):not(.e-info) {
            border-color: var(--fc-primary-hover);
            background-color: var(--fc-primary-hover);
            color: #FFFFFF;
        }

/* Dialog secondary/flat actions stay neutral instead of becoming another primary button. */
.e-footer-content .e-btn.e-flat:not(.e-primary):not([disabled]):not(.e-success):not(.e-danger):not(.e-warning):not(.e-info) {
    border-color: var(--fc-border);
    background-color: var(--fc-surface);
    color: var(--fc-navy);
}

.e-footer-content .e-btn.e-flat:not(.e-primary):hover:not([disabled]):not(.e-success):not(.e-danger):not(.e-warning):not(.e-info) {
    border-color: var(--fc-primary);
    background-color: var(--fc-primary-soft);
    color: var(--fc-primary);
}

.e-btn:disabled,
.e-btn.e-disabled,
.e-css.e-btn:disabled,
.e-css.e-btn.e-disabled,
.e-btn.e-primary:disabled,
.e-btn.e-primary.e-disabled,
.e-css.e-btn.e-primary:disabled,
.e-css.e-btn.e-primary.e-disabled {
    border-color: var(--fc-border);
    background-color: var(--fc-surface-secondary);
    color: var(--fc-text-disabled);
    opacity: 1;
}

/* Syncfusion themes define e-flat + e-primary disabled separately and may otherwise
   reintroduce the theme blue. Keep disabled primary actions in the FluxCertify palette. */
.e-btn.e-flat.e-primary:disabled,
.e-btn.e-flat.e-primary.e-disabled,
.e-css.e-btn.e-flat.e-primary:disabled,
.e-css.e-btn.e-flat.e-primary.e-disabled,
.e-footer-content .e-btn.e-flat.e-primary:disabled,
.e-footer-content .e-btn.e-flat.e-primary.e-disabled {
    border-color: var(--fc-border) !important;
    background-color: var(--fc-primary-soft) !important;
    color: var(--fc-text-disabled) !important;
    box-shadow: none !important;
    opacity: 1;
}

/* Keep semantic Syncfusion button states semantic. */
.e-btn.e-danger,
.e-css.e-btn.e-danger {
    border-color: var(--fc-danger);
    background-color: var(--fc-danger-bg);
    color: var(--fc-danger);
}

.e-btn.e-success,
.e-css.e-btn.e-success {
    border-color: var(--fc-success);
    background-color: var(--fc-success-bg);
    color: var(--fc-success);
}

.e-btn.e-warning,
.e-css.e-btn.e-warning {
    border-color: var(--fc-warning);
    background-color: var(--fc-warning-bg);
    color: var(--fc-warning);
}

.e-btn.e-info,
.e-css.e-btn.e-info {
    border-color: var(--fc-info);
    background-color: var(--fc-info-bg);
    color: var(--fc-info);
}
