.bc-settings {
    --bc-border: #dcdcde;
    --bc-muted: #646970;
    --bc-ok-bg: #e6f4ea;
    --bc-ok: #1a7f37;
    --bc-warn-bg: #fcf3e3;
    --bc-warn: #8a5a00;
    --bc-error-bg: #fcebea;
    --bc-error: #b32d2e;
    margin: 16px 0 24px;
}

.bc-intro {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.bc-intro__logo {
    width: 48px;
    height: 48px;
    flex: none;
}

.bc-intro h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.bc-intro p {
    margin: 0;
    color: var(--bc-muted);
}

.bc-intro .bc-pill {
    margin-left: auto;
    flex: none;
}

.bc-card {
    background: #fff;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    margin-bottom: 20px;
}

.bc-card__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--bc-border);
}

.bc-card__header h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.bc-card__header p {
    margin: 0;
    color: var(--bc-muted);
}

.bc-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--bc-border);
    border-radius: 10px;
}

.bc-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 0;
    border-radius: 7px;
    background: none;
    color: #50575e;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    cursor: pointer;
    transition: background-color .15s ease-out, color .15s ease-out;
}

.bc-tab:hover {
    background: #f0f0f1;
    color: #1d2327;
}

.bc-tab[aria-selected="true"] {
    background: #2271b1;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

.bc-tab[aria-selected="true"] .bc-tab__meta:not(.is-ok):not(.is-error) {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.bc-tab:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.bc-tab__meta {
    padding: 0 8px;
    border-radius: 999px;
    background: #f0f0f1;
    color: #50575e;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
}

.bc-tab__meta.is-ok {
    background: var(--bc-ok-bg);
    color: var(--bc-ok);
}

.bc-tab__meta.is-error {
    background: var(--bc-error-bg);
    color: var(--bc-error);
}

.bc-tab__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d63638;
    box-shadow: 0 0 0 2px #fff;
}

.bc-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 12px 10px 14px;
    border: 1px solid #f0c4c4;
    border-left: 4px solid #d63638;
    border-radius: 6px;
    background: #fcf0f1;
}

.bc-alert .dashicons {
    flex: none;
    color: #d63638;
}

.bc-alert__text {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    min-width: 0;
}

.bc-alert__text span {
    color: #50575e;
}

.bc-alert .button {
    flex: none;
    margin-left: auto;
}

.bc-panel[hidden] {
    display: none;
}

.bc-account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 20px;
    align-items: start;
}

.bc-account-layout > .bc-card {
    margin-bottom: 0;
}

.bc-account-layout .bc-credentials {
    padding: 4px 20px 8px;
}

.bc-help {
    padding: 16px 20px;
}

.bc-help h3 {
    margin: 0 0 10px;
    font-size: 15px;
}

.bc-help ol {
    margin: 0 0 12px 18px;
    color: #3c434a;
}

.bc-help li {
    margin-bottom: 8px;
}

.bc-help__note {
    padding: 8px 12px;
    border-radius: 6px;
    background: #f0f6fc;
    color: #1d2327;
}

.bc-help__note.is-warn {
    background: var(--bc-warn-bg);
    color: var(--bc-warn);
}

.bc-field {
    margin: 16px 0;
}

.bc-field > label,
.bc-field > legend {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1d2327;
    padding: 0;
}

.bc-field[hidden] {
    display: none;
}

.bc-settings textarea.bc-token,
.bc-settings input.bc-secret,
.bc-settings select.bc-portal {
    width: 100%;
    max-width: none;
}

.bc-settings textarea.bc-token {
    min-height: 0;
    resize: vertical;
}

.bc-field .description {
    margin: 6px 0 0;
    color: var(--bc-muted);
}

.bc-field.is-missing textarea,
.bc-field.is-missing input,
.bc-field.is-missing select {
    border-color: var(--bc-error);
}

.bc-missing {
    margin: 6px 0 0;
    color: var(--bc-error);
    font-size: 12px;
}

.bc-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: #f0f0f1;
    color: #50575e;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
}

.bc-pill--ok {
    background: var(--bc-ok-bg);
    color: var(--bc-ok);
}

.bc-pill--warn {
    background: var(--bc-warn-bg);
    color: var(--bc-warn);
}

.bc-pill--error {
    background: var(--bc-error-bg);
    color: var(--bc-error);
}

.bc-token-box {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

.bc-token-box:focus-within {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.bc-token-box textarea,
.bc-token-box textarea:focus {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.bc-field.is-missing .bc-token-box {
    border-color: var(--bc-error, #b32d2e);
}

.bc-verify {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 4px 6px 4px 12px;
    background: #f6f7f7;
    border-top: 1px solid #dcdcde;
}

.bc-verify__status {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: 12px;
    color: #646970;
}

.bc-verify__status::before {
    flex: none;
    width: 16px;
    height: 16px;
    font: 16px/1 dashicons;
    content: "\f348";
}

.bc-verify[data-state="ok"] .bc-verify__status {
    color: #1a7f37;
}

.bc-verify[data-state="ok"] .bc-verify__status::before {
    content: "\f12a";
}

.bc-verify[data-state="error"] .bc-verify__status {
    color: #b32d2e;
}

.bc-verify[data-state="error"] .bc-verify__status::before {
    content: "\f534";
}

.bc-verify[data-state="busy"] .bc-verify__status::before {
    content: "";
    box-sizing: border-box;
    border: 2px solid #c3c4c7;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: bc-spin .7s linear infinite;
}

.bc-verify__button.button {
    flex: none;
    margin-left: auto;
}

@keyframes bc-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bc-verify[data-state="busy"] .bc-verify__status::before {
        animation-duration: 2s;
    }
}


.bc-group {
    margin: 0;
    padding: 12px 20px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--bc-muted);
    background: #f6f7f7;
    border-bottom: 1px solid var(--bc-border);
}

.bc-methods {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bc-method {
    margin: 0;
    border-bottom: 1px solid var(--bc-border);
}

.bc-card > .bc-methods:last-child .bc-method:last-child {
    border-bottom: 0;
}

.bc-method__toggle {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 20px;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.bc-method__toggle:hover {
    background: #f6f7f7;
}

.bc-method__toggle:focus-visible {
    outline: 2px solid #2271b1;
    outline-offset: -2px;
}

.bc-method__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 32px;
    flex: none;
}

.bc-method__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bc-method:not(.is-on) .bc-method__logo {
    opacity: .55;
}

.bc-method__title {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bc-method__title strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
}

.bc-method__title > span {
    overflow: hidden;
    color: var(--bc-muted);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bc-tag {
    padding: 0 6px;
    border: 1px solid #c5d9ed;
    border-radius: 4px;
    background: #f0f6fc;
    color: #135e96;
    font-size: 11px;
    font-weight: 500;
    line-height: 18px;
    white-space: nowrap;
}

.bc-method__status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.bc-method__summary {
    color: var(--bc-muted);
    font-size: 12px;
    width: 100%;
    text-align: right;
}

.bc-method__summary.is-warning {
    color: var(--bc-error);
}

.bc-method__toggle .dashicons {
    flex: none;
    color: var(--bc-muted);
    transition: transform .15s ease-out;
}

.bc-method__toggle[aria-expanded="true"] .dashicons {
    transform: rotate(180deg);
}

.bc-method__body {
    padding: 12px 20px 8px 106px;
}

.bc-method.is-open {
    box-shadow: inset 3px 0 0 #2271b1;
}

.bc-method.is-open .bc-method__toggle {
    background: #f0f6fc;
    border-bottom: 1px solid #c5d9ed;
}

.bc-method.is-open .bc-method__toggle .dashicons {
    color: #2271b1;
}

.bc-method__body[hidden] {
    display: none;
}

.bc-method__body > .bc-field:first-child {
    margin-top: 4px;
}

.bc-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bc-choice {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--bc-border);
    border-radius: 6px;
    cursor: pointer;
}

.bc-choice:hover {
    border-color: #8c8f94;
}

.bc-choice:has(input:checked) {
    border-color: #2271b1;
    background: #f0f6fc;
    box-shadow: 0 0 0 1px #2271b1;
}

.bc-choice input {
    margin-top: 2px;
}

.bc-choice span {
    color: var(--bc-muted);
}

.bc-choice strong {
    display: block;
    color: #1d2327;
}

.bc-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.bc-form-account[hidden],
.give-field-wrap[hidden] {
    display: none !important;
}

.give-field-wrap .bc-token-box {
    width: 100%;
}

@media (min-width: 1600px) {
    .bc-methods {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 12px;
        padding: 12px 20px 20px;
    }

    .bc-method,
    .bc-card > .bc-methods:last-child .bc-method:last-child {
        border: 1px solid var(--bc-border);
        border-radius: 8px;
        overflow: hidden;
    }

    .bc-method.is-open,
    .bc-card > .bc-methods:last-child .bc-method.is-open:last-child {
        border-color: #2271b1;
        box-shadow: 0 0 0 1px #2271b1, 0 2px 8px rgba(34, 113, 177, .12);
    }

    .bc-method__toggle {
        padding: 12px 16px;
    }

    .bc-method__body {
        padding: 12px 16px 8px;
    }
}

@media (max-width: 1100px) {
    .bc-account-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .bc-tabs {
        display: flex;
    }

    .bc-tab {
        flex: 1 1 0;
        flex-direction: column;
        gap: 4px;
        padding: 8px;
    }

    .bc-intro {
        flex-wrap: wrap;
    }

    .bc-intro .bc-pill {
        margin-left: 0;
    }

    .bc-method__toggle {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .bc-method__status {
        margin-left: 0;
        justify-content: flex-start;
        width: 100%;
    }

    .bc-method__summary {
        text-align: left;
    }

    .bc-method__body {
        padding: 0 16px 8px;
    }

    .bc-choices {
        grid-template-columns: 1fr;
    }
}
