.mop-form,
.mop-dashboard,
.mop-table-section,
.mop-link-section {
    box-sizing: border-box;
    color: #172525;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.mop-form {
    width: min(100%, 620px);
    padding: 28px;
    border: 1px solid #dce5e2;
    border-radius: 16px;
    background: #fff;
}

.mop-form h2,
.mop-table-section h2,
.mop-table-section h3,
.mop-link-section h3 {
    margin: 0 0 18px;
    color: #173c35;
    font-size: 22px;
    line-height: 1.3;
}

.mop-form label {
    display: block;
    margin: 0 0 16px;
    color: #334440;
    font-size: 14px;
    font-weight: 700;
}

.mop-form input,
.mop-form textarea,
.mop-link-copy input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 46px;
    margin-top: 7px;
    padding: 11px 13px;
    border: 1px solid #bdcbc6;
    border-radius: 5px;
    background: #fff;
    color: #172525;
    font: inherit;
}

.mop-form textarea {
    min-height: 90px;
    resize: vertical;
}

.mop-form input:focus,
.mop-form textarea:focus,
.mop-link-copy input:focus {
    border-color: #16745f;
    outline: 2px solid rgb(22 116 95 / 18%);
}

/* Scope and pin button visuals so theme/WooCommerce defaults cannot wash them out. */
:is(.mop-form, .mop-dashboard, .mop-link-section) :is(.mop-button, .mop-copy) {
    --mop-button-bg: #176d5a;
    --mop-button-fg: #ffffff;
    --mop-button-border: #105544;
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px !important;
    border: 1px solid #105544 !important;
    border-radius: 8px !important;
    background: #176d5a !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 1 !important;
    filter: none !important;
    box-shadow: 0 3px 8px rgb(16 85 68 / 18%);
    text-shadow: none !important;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700 !important;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none !important;
    text-align: center;
    text-decoration: none !important;
}

:is(.mop-form, .mop-dashboard, .mop-link-section) :is(.mop-button, .mop-copy):is(:hover, :active) {
    --mop-button-bg: #105544;
    --mop-button-border: #0b4336;
    background: #105544 !important;
    border-color: #0b4336 !important;
}

:is(.mop-dashboard, .mop-link-section) .mop-button.mop-button-light {
    --mop-button-bg: #f1c45a;
    --mop-button-fg: #172525;
    --mop-button-border: #e5b13a;
    background: #f1c45a !important;
    border-color: #e5b13a !important;
    color: #172525 !important;
    -webkit-text-fill-color: #172525 !important;
}

:is(.mop-dashboard, .mop-link-section) .mop-button.mop-button-light:is(:hover, :active) {
    --mop-button-bg: #e5b13a;
    background: #e5b13a !important;
}

:is(.mop-form, .mop-dashboard, .mop-link-section) :is(.mop-button, .mop-copy):focus-visible {
    outline: 3px solid #176d5a !important;
    outline-offset: 3px;
    box-shadow: 0 0 0 3px #fff;
}

/* Keep actually disabled controls readable without re-enabling interaction. */
:is(.mop-form, .mop-dashboard, .mop-link-section) :is(.mop-button, .mop-copy):disabled {
    --mop-button-bg: #526b62;
    --mop-button-fg: #ffffff;
    --mop-button-border: #526b62;
    background: #526b62 !important;
    border-color: #526b62 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    box-shadow: none;
    cursor: not-allowed;
}

.mop-notice {
    width: min(100%, 620px);
    box-sizing: border-box;
    margin: 0 0 16px;
    padding: 13px 15px;
    border-left: 4px solid #176d5a;
    background: #e8f3ef;
    color: #173c35;
}

.mop-notice-error {
    border-color: #b23730;
    background: #fff0ed;
    color: #78251f;
}

.mop-notice-info {
    border-color: #b7831f;
    background: #fff7df;
    color: #5d4611;
}

.mop-account-banner {
    margin: -4px 0 20px;
    padding: 12px 14px;
    border-left: 3px solid #e8b844;
    background: #f4f7f5;
    font-weight: 700;
}

.mop-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 22px;
    padding: 8px;
    border-bottom: 1px solid #dce5e2;
}

.mop-nav a {
    padding: 10px 13px;
    color: #17463b;
    font-weight: 700;
    text-decoration: none;
}

.mop-nav a:hover {
    background: #e8f3ef;
}

.mop-nav .mop-nav-logout {
    margin-left: auto;
    color: #9c3028;
}

.mop-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px;
    background: #173c35;
    color: #fff;
}

.mop-dashboard-header h2 {
    margin: 6px 0;
    color: #fff;
    font-size: 26px;
}

.mop-dashboard-header p {
    margin: 0;
    color: #d4e4dd;
}

.mop-eyebrow {
    color: #f1c45a;
    font-size: 11px;
    font-weight: 700;
}

.mop-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 15px 0 22px;
}

.mop-stat {
    padding: 17px;
    border: 1px solid #dce5e2;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 5px 20px rgb(22 52 70 / 4%);
}

.mop-stat span,
.mop-stat strong {
    display: block;
}

.mop-stat span {
    margin-bottom: 9px;
    color: #53645f;
    font-size: 13px;
}

.mop-stat strong {
    color: #173c35;
    font-size: 22px;
}

.mop-link-section {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
    align-items: center;
    gap: 20px;
    margin: 0 0 26px;
    padding: 20px;
    border: 1px solid #dce5e2;
    background: #f4f7f5;
    border-radius: 14px;
}

.mop-link-section h3 {
    margin-bottom: 5px;
    font-size: 17px;
}

.mop-link-section p {
    margin: 0;
    color: #53645f;
    font-size: 13px;
}

.mop-link-copy {
    display: flex;
    gap: 8px;
}

.mop-link-copy input {
    min-width: 0;
    margin: 0;
}

.mop-copy-status {
    grid-column: 2;
    min-height: 18px;
    color: #176d5a;
    font-size: 13px;
}

.mop-table-section {
    margin-top: 22px;
}

.mop-table-scroll {
    overflow-x: auto;
    border: 1px solid #dce5e2;
    border-radius: 12px;
}

.mop-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

.mop-table th,
.mop-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e7edeb;
    text-align: left;
    white-space: nowrap;
}

.mop-table th {
    background: #edf3f0;
    color: #294a41;
    font-size: 12px;
}

.mop-order-status {
    display: inline-block;
    padding: 4px 8px;
    background: #e8f3ef;
    color: #176d5a;
    font-size: 12px;
    border-radius: 6px;
}

.mop-dashboard { max-width: 1280px; margin: 0 auto; }
.mop-dashboard-header { border-radius: 18px; background: linear-gradient(115deg, #112e40, #154e56); }
.mop-nav { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #fff; border: 1px solid #dce5e2; border-radius: 12px; gap: 8px; }
.mop-nav a { border-radius: 8px; text-decoration: none; }
.mop-nav a[aria-current="page"] { background: #e7f4f0; color: #08695e; font-weight: 700; }
.mop-form { box-shadow: 0 12px 38px rgb(22 52 70 / 6%); padding: 32px; }
.mop-session p { font-size: 15px; line-height: 1.7; }
.mop-session-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 22px; }
.mop-session-actions > a:not(.mop-button) { color: #176d5a; text-decoration: underline; font-size: 14px; }
.mop-form input:not([type="hidden"]), .mop-form textarea, .mop-link-copy input, .mop-button, .mop-copy { border-radius: 8px; }
.mop-link-card { grid-template-columns: 1fr; padding: 30px; }
.mop-link-card .mop-copy-status { grid-column: 1; }
.mop-link-card .mop-eyebrow { color: #176d5a; letter-spacing: 1.5px; }
.mop-link-card h2 { margin: 12px 0; font-size: 28px; color: #173c35; }
.mop-link-card .mop-button { justify-self: start; }
.mop-section-description { color: #61756f; margin: -6px 0 16px; font-size: 13px; }
.mop-form button:focus-visible, .mop-copy:focus-visible, .mop-button:focus-visible, .mop-nav a:focus-visible { outline: 3px solid #179584; outline-offset: 3px; }

.mop-status-pending,
.mop-status-on-hold {
    background: #fff7df;
    color: #755411;
}

.mop-status-cancelled,
.mop-status-failed,
.mop-status-refunded {
    background: #fff0ed;
    color: #9c3028;
}

@media (max-width: 700px) {
    .mop-form {
        padding: 20px;
    }

    .mop-dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .mop-stats {
        grid-template-columns: 1fr 1fr;
    }

    .mop-link-section {
        grid-template-columns: 1fr;
    }

    .mop-copy-status {
        grid-column: 1;
    }
}

@media (max-width: 420px) {
    .mop-stats {
        grid-template-columns: 1fr;
    }

    .mop-link-copy {
        align-items: stretch;
        flex-direction: column;
    }

    .mop-nav .mop-nav-logout {
        margin-left: 0;
    }
}

/* Public payment page: billing information first, payment provider on the next step. */
.mop-payment-page {
    --mop-payment-ink: #1b3545;
    --mop-payment-muted: #637783;
    --mop-payment-line: #dfe8e9;
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px;
    border: 1px solid #e6ecee;
    border-radius: 24px;
    background: #f5f8f8;
    color: var(--mop-payment-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
.mop-payment-page *, .mop-payment-page *::before, .mop-payment-page *::after { box-sizing: border-box; }
.mop-payment-page .mop-svg-icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.mop-payment-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.mop-payment-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.mop-payment-brand > div:last-child { min-width: 0; }
.mop-payment-brand-mark { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 78px; height: 78px; padding: 12px; border: 1px solid var(--mop-payment-line); border-radius: 18px; background: #fff; color: #176d5a; box-shadow: 0 5px 16px #173c3505; }
.mop-payment-brand-mark > .mop-svg-icon { width: 34px; height: 34px; }
.mop-payment-brand-mark.mop-has-logo { width: 116px; }
.mop-payment-brand-mark img.mop-payment-logo { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.mop-payment-eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; color: #426d64; overflow-wrap: anywhere; }
.mop-payment-page .mop-payment-header h2 { margin: 4px 0 2px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.3; letter-spacing: -.7px; color: var(--mop-payment-ink); font-weight: 700; }
.mop-payment-page .mop-payment-header p { margin: 0; font-size: 13px; color: var(--mop-payment-muted); overflow-wrap: anywhere; }
.mop-payment-header-note { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #5c7771; flex-shrink: 0; }
.mop-payment-page ol.mop-payment-steps { display: flex; list-style: none; margin: 0 0 24px; padding: 16px 20px; border: 1px solid var(--mop-payment-line); border-radius: 12px; background: #fff; gap: 24px; }
.mop-payment-page .mop-payment-steps li { display: flex; align-items: center; flex: 1; gap: 11px; margin: 0; padding: 0; list-style: none; color: #778792; }
.mop-payment-steps li + li { border-left: 1px solid var(--mop-payment-line); padding-left: 24px !important; }
.mop-payment-steps li > span { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: #eff3f4; color: #6d7d87; font-size: 11px; font-weight: 700; }
.mop-payment-steps li[aria-current] > span { background: #176d5a; color: #fff; }
.mop-payment-steps strong, .mop-payment-steps small { display: block; }
.mop-payment-steps strong { font-size: 12px; font-weight: 650; color: #586e7b; }
.mop-payment-steps small { font-size: 11px; margin-top: 2px; color: #697b87; }
.mop-payment-steps li[aria-current] strong { color: #176d5a; }
.mop-payment-page form.mop-payment-form { width: 100%; max-width: none; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.mop-payment-layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(260px, 1fr); gap: 22px; align-items: start; }
.mop-payment-main { min-width: 0; padding: 28px; border: 1px solid var(--mop-payment-line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px #173c3503; }
.mop-payment-page fieldset.mop-payment-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.mop-payment-page .mop-payment-group legend { display: block; float: none; width: 100%; margin: 0; padding: 0; border: 0; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--mop-payment-ink); }
.mop-payment-page .mop-payment-description { margin: 7px 0 21px; color: var(--mop-payment-muted); font-size: 12px; line-height: 1.7; }
.mop-payment-amount-box { padding: 19px 20px 16px; margin-bottom: 24px; border: 1px solid #c9e1d9; border-radius: 12px; background: #f6fbf8; }
.mop-payment-page .mop-payment-amount-box > label { margin: 0 0 4px; font-size: 12px; font-weight: 650; color: #295d4d; }
.mop-payment-amount-input { display: flex; align-items: center; gap: 9px; }
.mop-payment-amount-input > span:first-child { font-size: 26px; line-height: 1; color: #176d5a; font-weight: 500; }
.mop-payment-page .mop-payment-form .mop-payment-amount-input input { width: 100%; min-width: 0; height: 52px; min-height: 52px; margin: 0; padding: 5px 2px; border: 0 !important; border-radius: 5px; background: transparent !important; box-shadow: none; font-size: 30px; line-height: 1.3; font-weight: 650; font-variant-numeric: tabular-nums; color: #173c35 !important; }
.mop-payment-page .mop-payment-form .mop-payment-amount-input input::placeholder { color: #759488; opacity: 1; }
.mop-payment-page .mop-payment-currency { padding: 4px 7px; border: 1px solid #d5e7df; border-radius: 5px; color: #406d5d; font-size: 10px; font-weight: 700; letter-spacing: .8px; }
.mop-payment-amount-box > small { display: block; margin-top: 7px; color: #637d70; font-size: 10px; }
.mop-payment-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.mop-payment-page .mop-payment-form label.mop-payment-field { display: block; min-width: 0; margin: 0; font-size: 12px; font-weight: 650; line-height: 1.5; color: #2d4653; }
.mop-payment-field-wide { grid-column: 1 / -1; }
.mop-payment-page .mop-required { color: #176d5a; font-weight: 700; }
.mop-payment-page .mop-optional { display: inline; margin-left: 4px; font-size: 9px; color: #637783; font-weight: 400; white-space: nowrap; }
.mop-payment-input { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 47px; margin-top: 8px; padding: 0 12px; border: 1px solid #d2dee0; border-radius: 8px; background: #fff; }
.mop-payment-input > .mop-svg-icon { width: 17px; height: 17px; color: #8a9d9f; }
.mop-payment-page .mop-payment-field-help { display: block; margin-top: 7px; font-size: 11px; line-height: 1.5; font-weight: 400; color: #637783; }
.mop-payment-page .mop-payment-form .mop-payment-input input { display: block; width: 100%; min-width: 0; height: 45px; min-height: 45px; margin: 0 !important; padding: 8px 0 !important; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 13px; font-weight: 400; line-height: 1.4; color: #213e4c !important; }
.mop-payment-page .mop-payment-form .mop-payment-input input:focus { outline: 0; }
.mop-payment-input:focus-within { border-color: #176d5a; outline: 3px solid #176d5a1c; outline-offset: 1px; }
.mop-payment-page .mop-payment-form input::placeholder, .mop-payment-page .mop-payment-form textarea::placeholder { opacity: 1; color: #657983; font-size: 12px; font-weight: 400; }
.mop-payment-page .mop-payment-form .mop-payment-amount-input input::placeholder { font-size: inherit; }
.mop-payment-page .mop-payment-form textarea { width: 100%; height: auto; min-height: 88px; margin: 8px 0 0; padding: 12px; border: 1px solid #d2dee0; border-radius: 8px; background: #fff; color: #213e4c; font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.5; }
.mop-payment-page fieldset.mop-payment-billing { margin-top: 26px; padding-top: 24px; border-top: 1px solid #e7eeee; }
.mop-payment-page .mop-payment-billing legend { margin-bottom: 18px; padding-top: 22px; font-size: 14px; }
.mop-payment-summary { min-width: 0; padding: 26px; border: 1px solid #d7e5e1; border-radius: 16px; background: linear-gradient(155deg, #eef7f2 0%, #f9fcfa 70%); }
.mop-payment-summary-icon { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; margin-bottom: 16px; border: 1px solid #d4e5dc; border-radius: 12px; background: #fff; color: #176d5a; }
.mop-payment-page .mop-payment-summary h3 { margin: 0 0 22px; font-size: 18px; line-height: 1.4; font-weight: 650; color: #204e41; }
.mop-payment-summary dl { margin: 0; padding: 0; }
.mop-payment-summary dl > div { margin-bottom: 15px; }
.mop-payment-summary dt { margin: 0 0 4px; font-size: 11px; font-weight: 400; color: #637c71; }
.mop-payment-summary dd { margin: 0; font-size: 13px; font-weight: 600; color: #244f41; overflow-wrap: anywhere; }
.mop-payment-total { padding: 23px 0; margin-top: 22px; border-top: 1px solid #d7e5dd; border-bottom: 1px solid #d7e5dd; }
.mop-payment-total > span { display: block; margin-bottom: 9px; font-size: 11px; color: #5f7b6e; }
.mop-payment-total output { display: block; margin: 0; font-size: 26px; font-weight: 700; line-height: 1.4; letter-spacing: -.7px; color: #174c3b; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mop-payment-total small { display: block; margin-top: 5px; font-size: 10px; font-weight: 650; letter-spacing: 1px; color: #6c8578; }
.mop-payment-next { display: flex; gap: 11px; align-items: flex-start; margin-top: 24px; color: #315e4d; }
.mop-payment-next > span { display: block; flex-shrink: 0; padding-top: 1px; }
.mop-payment-next strong { display: block; font-size: 12px; line-height: 1.6; font-weight: 650; }
.mop-payment-page .mop-payment-next p { margin: 6px 0 0; color: #5f7b6e; font-size: 11px; line-height: 1.8; }
.mop-payment-page p.mop-payment-summary-footnote { margin: 23px 0 0; padding-top: 18px; border-top: 1px solid #d7e5dd; font-size: 10px; line-height: 1.8; color: #6a8176; }
.mop-payment-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 22px; padding: 20px 24px; border: 1px solid var(--mop-payment-line); border-radius: 12px; background: #fff; }
.mop-payment-page .mop-payment-footer p { margin: 0; color: #637783; font-size: 11px; }
.mop-payment-page .mop-payment-form .mop-payment-submit { display: inline-flex; align-items: center; justify-content: center; gap: 20px; width: auto; min-width: 250px; min-height: 50px; margin: 0; box-shadow: 0 5px 12px #176d5a20; }
.mop-payment-submit span { color: inherit; }
@media (max-width: 960px) {
    .mop-payment-page { padding: 24px; }
    .mop-payment-header-note { display: none; }
    .mop-payment-layout { grid-template-columns: minmax(0, 1.6fr) minmax(235px, 1fr); gap: 16px; }
    .mop-payment-main, .mop-payment-summary { padding: 22px; }
    .mop-payment-fields { grid-template-columns: 1fr; }
}
@media (max-width: 740px) {
    .mop-payment-page { padding: 20px; border-radius: 16px; }
    .mop-payment-layout { grid-template-columns: 1fr; }
    .mop-payment-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mop-payment-summary-icon { display: none; }
    .mop-payment-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .mop-payment-summary dl > div { margin: 0; }
    .mop-payment-footer { flex-direction: column; gap: 12px; padding: 18px; }
    .mop-payment-page .mop-payment-form .mop-payment-submit { width: 100%; min-width: 0; }
}
@media (max-width: 480px) {
    .mop-payment-page { padding: 14px; }
    .mop-payment-header { margin: 8px 0 22px; }
    .mop-payment-brand { gap: 12px; }
    .mop-payment-brand-mark { width: 58px; height: 58px; padding: 10px; border-radius: 14px; }
    .mop-payment-brand-mark.mop-has-logo { width: 78px; }
    .mop-payment-eyebrow { font-size: 9px; }
    .mop-payment-page .mop-payment-header h2 { font-size: 25px; }
    .mop-payment-page ol.mop-payment-steps { padding: 13px 12px; gap: 12px; }
    .mop-payment-page .mop-payment-steps li { gap: 7px; }
    .mop-payment-steps li + li { padding-left: 12px !important; }
    .mop-payment-steps strong { font-size: 10px; }
    .mop-payment-steps small { display: none; }
    .mop-payment-steps li > span { width: 26px; height: 26px; font-size: 10px; }
    .mop-payment-main, .mop-payment-summary { padding: 20px 16px; }
    .mop-payment-fields { grid-template-columns: 1fr; }
    .mop-payment-amount-box { padding: 16px; }
    .mop-payment-summary dl { grid-template-columns: 1fr; }
}
