.maca-payments-wrap .maca-payments-notice {
    margin: 12px 0 16px;
}

.maca-payment-history-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0 20px;
}

.maca-payment-history-stat {
    flex: 1 1 120px;
    min-width: 100px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    text-align: center;
}

.maca-payment-history-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.maca-payment-history-stat-label {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #50575e;
}

.maca-payment-history-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.maca-payment-history-filters label {
    font-weight: 600;
}

.maca-payment-history-table .maca-payment-history-row--paid {
    background-color: #f0faf0;
}

.maca-payment-history-table .maca-payment-history-row--pending {
    background-color: #fff8e5;
}

.maca-payment-history-table .maca-payment-history-row--partial {
    background-color: #f0f6fc;
}

.maca-payment-history-external-id {
    font-size: 11px;
    word-break: break-all;
}

.maca-payment-history-external-id-link {
    white-space: nowrap;
}

.maca-payment-external-id-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.maca-payment-external-id-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.maca-payment-external-id-modal__dialog {
    position: relative;
    width: min(640px, calc(100vw - 32px));
    margin: 8vh auto 0;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.maca-payment-external-id-modal__dialog h2 {
    margin: 0 0 12px;
}

.maca-payment-external-id-modal__dialog .maca-payment-history-external-id {
    display: block;
    padding: 10px 12px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.maca-payment-external-id-modal__actions {
    margin: 14px 0 0;
}

.maca-payments-tabs {
    margin-bottom: 0;
}

.maca-payments-settings-tabs {
    margin: 0 0 16px;
}

.maca-payments-settings-form .maca-payments-settings-panel {
    display: none;
}

.maca-payments-settings-form .maca-payments-settings-panel.is-active {
    display: block;
}

.maca-payments-online-fieldset {
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #f6f7f7;
}

.maca-payments-online-disabled-notice {
    margin: 0 0 16px;
}

.maca-payments-tabs .nav-tab.maca-payments-tab--requires-online {
    opacity: 0.65;
}

.maca-payments-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
    align-items: flex-start;
}

.maca-payments-sidebar {
    flex: 0 0 280px;
    max-width: 100%;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.maca-payments-sidebar h2 {
    margin-top: 0;
    font-size: 14px;
}

.maca-payments-sidebar h3 {
    font-size: 13px;
    margin: 20px 0 8px;
}

.maca-payments-main {
    flex: 1 1 480px;
    min-width: 0;
}

.maca-payments-checklist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.maca-payments-checklist li {
    position: relative;
    padding: 8px 0 8px 28px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
}

.maca-payments-checklist li:last-child {
    border-bottom: none;
}

.maca-payments-check {
    position: absolute;
    left: 0;
    top: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #c3c4c7;
    background: #fff;
}

.maca-payments-checklist .is-done .maca-payments-check {
    border-color: #00a32a;
    background: #00a32a;
}

.maca-payments-checklist .is-done .maca-payments-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.maca-payments-check-hint {
    display: block;
    color: #646970;
    font-size: 12px;
    margin-top: 2px;
}

.maca-payments-webhook-label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    margin: 12px 0 4px;
}

.maca-payments-webhook-url {
    display: block;
    word-break: break-all;
    font-size: 11px;
    padding: 8px;
    background: #f6f7f7;
    margin-bottom: 8px;
}

.maca-payments-provider-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 16px 20px;
    margin: 20px 0;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.maca-payments-provider-card h2 {
    margin-top: 0;
}

.maca-payments-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.maca-payments-status--ok {
    background: #edfaef;
    color: #1e4620;
}

.maca-payments-status--warn {
    background: #fcf9e8;
    color: #614200;
}

.maca-payments-guide.maca-guide-content {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px 24px;
    max-width: 900px;
}

.maca-payments-guide h2 {
    margin-top: 1.6em;
    padding-top: 0.2em;
    border-top: 1px solid #e0e0e0;
}

.maca-payments-guide h2:first-of-type {
    border-top: none;
    margin-top: 0;
}

.maca-payments-guide table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.maca-payments-guide th,
.maca-payments-guide td {
    border: 1px solid #c3c4c7;
    padding: 8px 10px;
    text-align: left;
}

.maca-payments-guide blockquote {
    border-left: 4px solid #2271b1;
    margin: 1em 0;
    padding: 8px 16px;
    background: #f0f6fc;
}

@media (max-width: 960px) {
    .maca-payments-sidebar {
        flex: 1 1 100%;
    }
}

/* Cash register / online payment acknowledgment modal */
body.maca-pos-warning-modal-open {
    overflow: hidden;
}

.maca-pos-warning-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: block;
}

.maca-pos-warning-modal[hidden] {
    display: none !important;
}

.maca-pos-warning-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.maca-pos-warning-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(560px, calc(100vw - 32px));
    max-height: min(88vh, 720px);
    margin: 6vh auto 0;
    padding: 0;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.maca-pos-warning-modal__title {
    margin: 0;
    padding: 18px 20px 12px;
    font-size: 1.15em;
    line-height: 1.35;
    border-bottom: 1px solid #dcdcde;
}

.maca-pos-warning-modal__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 20px 8px;
}

.maca-pos-warning-modal__body p {
    margin: 0 0 12px;
    line-height: 1.55;
}

.maca-pos-warning-modal__body p:last-child {
    margin-bottom: 0;
}

.maca-pos-warning-modal__scroll-hint {
    margin: 14px 0 0;
    padding: 10px 12px;
    font-size: 12px;
    color: #646970;
    background: #fcf9e8;
    border: 1px solid #f0e6b8;
    border-radius: 4px;
}

.maca-pos-warning-modal__ack {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 16px 0 0;
    padding: 14px 0 4px;
    border-top: 1px solid #dcdcde;
    font-weight: 600;
    line-height: 1.45;
    cursor: pointer;
}

.maca-pos-warning-modal__ack input {
    margin: 3px 0 0;
    flex-shrink: 0;
}

.maca-pos-warning-modal__ack input:disabled + span {
    color: #a7aaad;
    cursor: not-allowed;
}

.maca-pos-warning-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    padding: 12px 20px 18px;
    border-top: 1px solid #dcdcde;
    background: #f6f7f7;
}
