.atb-top-bar {
    --atb-top-bar-bg: #0B5FFF;
    --atb-top-bar-text: #FFFFFF;
    --atb-top-bar-btn-bg: #FFFFFF;
    --atb-top-bar-btn-text: #0B5FFF;
    --atb-top-bar-btn-hover-bg: #EAF0FF;
    --atb-top-bar-btn-hover-text: #063A9B;
    --atb-top-bar-btn-focus-bg: #FFFFFF;
    --atb-top-bar-btn-focus-text: #000000;
    --atb-top-bar-btn-focus-outline: #111111;
    --atb-top-bar-btn-focus-outline-size: 3px;
    --atb-top-bar-btn-focus-outline-style: solid;

    background: var(--atb-top-bar-bg);
    color: var(--atb-top-bar-text);
    width: 100%;
    position: relative;
    z-index: 10;
}

.atb-top-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.atb-top-bar__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    text-align: center;
}

@media (min-width: 600px) {
    .atb-top-bar__content {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .atb-top-bar__message {
        /* flex: 1 1 auto; */
        min-width: 0;
    }

    .atb-top-bar__actions {
        flex: 0 0 auto;
    }
}

.atb-top-bar__message,
.atb-top-bar__message p,
.atb-top-bar__message a,
.atb-top-bar__message strong,
.atb-top-bar__message em {
    color: var(--atb-top-bar-text);
    margin-top: 2px;
}

.atb-top-bar__message p {
    margin: 0;
}

.atb-top-bar__message a {
    text-decoration: underline;
}

.atb-top-bar__actions {
    display: flex;
    justify-content: center;
}

.atb-top-bar__button,
.atb-top-bar__button:visited,
.atb-top-bar__button--preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border: 0;
    text-decoration: none;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    background: var(--atb-top-bar-btn-bg);
    color: var(--atb-top-bar-btn-text);
    border-radius: 5px;
}

.atb-top-bar__button:hover,
.atb-top-bar__button:focus:hover {
    background: var(--atb-top-bar-btn-hover-bg);
    color: var(--atb-top-bar-btn-hover-text);
}

.atb-top-bar__button:focus,
.atb-top-bar__button:focus-visible {
    background: var(--atb-top-bar-btn-focus-bg);
    color: var(--atb-top-bar-btn-focus-text);
    outline: var(--atb-top-bar-btn-focus-outline-size) var(--atb-top-bar-btn-focus-outline-style) var(--atb-top-bar-btn-focus-outline);
    outline-offset: 2px;
}

.atb-top-bar--editor {
    margin: 0;
}

.atb-top-bar--editor .block-editor-rich-text__editable {
    color: inherit;
}

.atb-top-bar-admin-page .description code,
.atb-top-bar-placement code {
    word-break: break-word;
}

.atb-settings-panel {
    margin-top: 1rem;
    max-width: 1100px;
}

.atb-top-bar-placement,
.atb-top-bar-preview-wrap,
.atb-top-bar-contrast-panel {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #dcdcde;
}

.atb-top-bar-preview-wrap .atb-top-bar {
    margin-top: 0.75rem;
}

.atb-contrast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.atb-contrast-card {
    border: 1px solid #dcdcde;
    background: #f6f7f7;
    padding: 0.875rem;
}

.atb-contrast-card__result {
    margin-top: 0.5rem;
    font-weight: 700;
}

.atb-contrast-card.is-pass-aaa {
    border-color: #1e7f37;
    background: #edf9f0;
}

.atb-contrast-card.is-pass-aa {
    border-color: #2271b1;
    background: #eef6fc;
}

.atb-contrast-card.is-warn {
    border-color: #996800;
    background: #fff8e5;
}

.atb-contrast-card.is-fail {
    border-color: #b32d2e;
    background: #fcf0f1;
}

@media (min-width: 782px) {
    .atb-top-bar__content {
        flex-direction: row;
        flex-wrap: wrap;
    }
}




/* ── Admin panels ────────────────────────────────────────────────────────── */
.atb-panel {
    background: #fff;
    border: 1px solid #dcdcde;
    margin-bottom: 1.5rem;
}

.atb-panel__header {
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid #dcdcde;
}

.atb-panel__title {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.atb-panel--preview .atb-panel__body {
    padding: 1.25rem;
}

.atb-panel__body {
    padding: 1.25rem;
}

.atb-field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-end;
}

.atb-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.atb-label {
    font-weight: 600;
    font-size: 0.875rem;
}

.atb-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

.atb-toggle__label {
    font-weight: 600;
}

.atb-conditional {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f1;
}

.atb-placement-option {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f0f0f1;
}

.atb-placement-option:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.atb-placement-option__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.atb-code-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
    padding: 0.625rem 0.875rem;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
}

.atb-code-block code {
    font-size: 0.8125rem;
    word-break: break-all;
}

.atb-contrast-badge {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ── Contrast card states ────────────────────────────────────────────────── */
.atb-contrast-card {
    border: 1px solid #dcdcde;
    background: #f6f7f7;
    padding: 0.875rem;
    flex: 1;
    min-width: 180px;
}

.atb-contrast-card__label {
    font-size: 0.8125rem;
    color: #50575e;
}

.atb-contrast-card__result {
    margin-top: 0.375rem;
    font-weight: 700;
    font-size: 0.9375rem;
}

.atb-contrast-card.is-pass-aaa { border-color: #1e7f37; background: #edf9f0; }
.atb-contrast-card.is-pass-aa  { border-color: #2271b1; background: #eef6fc; }
.atb-contrast-card.is-warn     { border-color: #996800; background: #fff8e5; }
.atb-contrast-card.is-fail     { border-color: #b32d2e; background: #fcf0f1; }
