.pgs-customer-tracking {
    --pgs-customer-ink: #243247;
    --pgs-customer-accent: #b23542;
    position: fixed;
    left: max(18px, env(safe-area-inset-left));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 9900;
    max-width: calc(100vw - 36px);
    color: var(--pgs-customer-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
    box-sizing: border-box;
}
.pgs-customer-tracking.is-open { z-index: 2147483100; }
.pgs-customer-tracking *, .pgs-customer-tracking *::before, .pgs-customer-tracking *::after { box-sizing: border-box; }
.pgs-customer-tracking [hidden] { display: none !important; }
.pgs-customer-tracking button, .pgs-customer-tracking a { -webkit-tap-highlight-color: transparent; }
.pgs-customer-tracking button:focus-visible, .pgs-customer-tracking a:focus-visible { outline: 3px solid #679dda; outline-offset: 3px; }
.pgs-customer-tracking .pgs-customer-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    max-width: 240px;
    padding: 9px 16px 9px 12px;
    border: 1px solid #e8dfe1;
    border-radius: 17px;
    background: #fff;
    color: var(--pgs-customer-ink);
    box-shadow: 0 5px 22px #24324721;
    cursor: pointer;
    text-align: left;
    line-height: 1.35;
    font: inherit;
    margin: 0;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.pgs-customer-tracking .pgs-customer-toggle:hover { border-color: #ca939a; box-shadow: 0 7px 24px #2432472a; }
.pgs-customer-icon { display: grid; place-items: center; flex: 0 0 30px; color: var(--pgs-customer-accent); }
.pgs-customer-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pgs-customer-toggle-label { display: grid; gap: 2px; min-width: 0; }
.pgs-customer-toggle-label strong { font-size: 14px; font-weight: 650; color: inherit; }
.pgs-customer-summary { font-size: 12px; color: #69758a; }
.pgs-customer-panel { width: 370px; max-width: calc(100vw - 36px); margin: 0 0 12px; border: 1px solid #e8dfe1; border-radius: 19px; background: #fff; box-shadow: 0 12px 38px #24324726; overflow: hidden; }
.pgs-customer-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 15px 16px 12px; border-bottom: 1px solid #f1edef; }
.pgs-customer-heading h2 { margin: 0; font-family: inherit; font-size: 17px; font-weight: 650; line-height: 1.35; color: var(--pgs-customer-ink); }
.pgs-customer-tracking .pgs-customer-close { width: 32px; height: 32px; min-height: 0; border: 0; padding: 0; border-radius: 9px; font: inherit; font-size: 24px; line-height: 1; color: #6c7788; background: #f5f5f7; cursor: pointer; margin: 0; }
.pgs-customer-tracking .pgs-customer-close:hover { color: var(--pgs-customer-ink); background: #efedf0; }
.pgs-customer-list { display: grid; gap: 10px; padding: 13px; max-height: min(420px, calc(100dvh - 170px)); overflow-y: auto; overscroll-behavior: contain; }
.pgs-customer-card { padding: 12px; border: 1px solid #ece6e7; border-radius: 12px; background: #fff; }
.pgs-customer-card-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 7px; }
.pgs-customer-carrier { font-size: 12px; font-weight: 650; color: #657087; }
.pgs-customer-status { display: inline-flex; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 3px 7px; background: #eff3f8; color: #46617e; }
.pgs-status-importing, .pgs-status-dispatching { color: #925a34; background: #fff1e7; }
.pgs-status-delivered { color: #257154; background: #eaf7f0; }
.pgs-status-issue, .pgs-status-returned { color: #a15e26; background: #fff4e9; }
.pgs-customer-code { display: block; margin-top: 9px; font-size: 14px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; color: var(--pgs-customer-ink); }
.pgs-customer-order { display: block; margin-top: 10px; font-size: 12px; color: #69758a; }
.pgs-customer-progress { font-size: 13px; line-height: 1.65; color: #69758a; margin: 7px 0 0; overflow-wrap: anywhere; }
.pgs-customer-journey { margin-top: 14px; border-top: 1px solid #edeff2; padding-top: 12px; }
.pgs-customer-journey > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #315985; }
.pgs-customer-events { margin: 15px 0 0; padding: 0 0 0 14px; list-style: none; border-left: 1px solid #dce3eb; }
.pgs-customer-events li { position: relative; padding: 0 0 18px 10px; }
.pgs-customer-events li:last-child { padding-bottom: 0; }
.pgs-customer-events li::before { content: ''; position: absolute; width: 9px; height: 9px; border: 2px solid #fff; background: #c7d1dd; border-radius: 50%; left: -19px; top: 5px; }
.pgs-customer-events li:first-child::before { background: #367bb4; }
.pgs-customer-events strong { display: block; font-size: 13px; color: #243247; }
.pgs-customer-events time { display: block; font-size: 11px; color: #7b8596; margin-top: 3px; }
.pgs-customer-events p { font-size: 12px; line-height: 1.6; margin: 5px 0 0; color: #69758a; overflow-wrap: anywhere; }
.pgs-customer-account-link { display: block; padding: 12px 16px; border-top: 1px solid #edeff2; text-decoration: none; color: #315985; font-size: 13px; font-weight: 600; }
.pgs-account-shipments {
    --pgs-customer-ink: #243247; --pgs-customer-accent: #b23542;
    color: var(--pgs-customer-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px; line-height: 1.5; text-align: left; margin: 0 0 30px; padding: 24px;
    background: #fff; border: 1px solid #e7e9ee; border-radius: 18px; scroll-margin-top: 110px;
}
.pgs-account-shipments, .pgs-account-shipments * { box-sizing: border-box; }
.pgs-account-shipments[hidden] { display: none !important; }
.pgs-account-heading h2 { margin: 0 !important; font: 650 24px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important; color: #243247 !important; }
.pgs-account-heading p { font-size: 14px; color: #69758a; margin: 7px 0 20px; }
.pgs-account-list { display: grid; gap: 16px; }
.pgs-account-list .pgs-customer-card { padding: 20px; border-radius: 13px; background: #fcfdff; min-width: 0; }
.pgs-account-list .pgs-customer-code { font-size: 19px; }
.pgs-account-list .pgs-customer-progress { font-size: 14px; }
.pgs-account-list .pgs-customer-events strong { font-size: 14px; }
.pgs-account-list .pgs-customer-events time, .pgs-account-list .pgs-customer-events p { font-size: 13px; }
.pgs-account-list .pgs-customer-link { display: inline-block; margin-top: 15px; color: #315985; font-size: 13px; text-decoration: none; }
.pgs-account-help { margin-top: 18px; padding-top: 15px; border-top: 1px solid #edeff2; }
.pgs-account-help a { font-size: 13px; color: #315985; text-decoration: none; }
.pgs-account-help a:hover, .pgs-account-list .pgs-customer-link:hover { text-decoration: underline; }
.pgs-customer-empty { margin: 0; color: #69758a; font-size: 14px; padding: 16px 0; }
.pgs-account-shipments .pgs-customer-retry { padding: 9px 16px; color: #243247; background: #f1f4f8; border: 1px solid #dae0e8; border-radius: 8px; font: inherit; cursor: pointer; width: fit-content; }
.pgs-account-shipments .pgs-customer-more, .pgs-customer-tracking .pgs-customer-more { padding: 10px 16px; color: #315985; background: #f1f4f8; border: 1px solid #dae0e8; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; min-height: 42px; width: 100%; }
.pgs-account-shipments .pgs-customer-more:hover, .pgs-customer-tracking .pgs-customer-more:hover { background: #e8eef6; }
.pgs-customer-more:disabled { opacity: .6; cursor: wait; }
.pgs-account-shipments a:focus-visible, .pgs-account-shipments summary:focus-visible, .pgs-account-shipments button:focus-visible { outline: 3px solid #679dda; outline-offset: 3px; }
.pgs-customer-tracking .pgs-customer-link { display: inline-block; margin-top: 8px; padding: 3px 0; font-size: 12px; font-weight: 600; color: var(--pgs-customer-accent); text-decoration: none; }
.pgs-customer-tracking .pgs-customer-link:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .pgs-account-shipments { padding: 18px 14px; border-radius: 14px; }
    .pgs-account-heading h2 { font-size: 21px !important; }
    .pgs-account-list .pgs-customer-card { padding: 16px; }
    .pgs-customer-tracking { left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); max-width: calc(100vw - 24px); }
    .pgs-customer-panel { width: min(350px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
    .pgs-customer-tracking .pgs-customer-toggle { min-height: 48px; padding: 7px 12px 7px 9px; gap: 7px; border-radius: 14px; }
    .pgs-customer-toggle-label strong { font-size: 12px; }
    .pgs-customer-summary { font-size: 11px; }
    .pgs-customer-icon { flex-basis: 25px; }
    .pgs-customer-icon svg { width: 23px; height: 23px; }
}
@media (prefers-reduced-motion: reduce) {
    .pgs-customer-tracking .pgs-customer-toggle { transition: none; }
}

/* Scoped to the customer's single order page. Woo still supplies products and totals. */
.pgs-order-view {
    --pgs-order-ink: #243247;
    --pgs-order-muted: #687587;
    --pgs-order-accent: #96384a;
    color: var(--pgs-order-ink);
    font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    width: 100%; min-width: 0; margin: 0 0 36px; text-align: left;
}
.pgs-order-view, .pgs-order-view *, .pgs-order-view *::before, .pgs-order-view *::after { box-sizing: border-box; }
.pgs-order-view h2, .pgs-order-view h3 { font-family: inherit !important; color: var(--pgs-order-ink) !important; line-height: 1.4; letter-spacing: -.02em; }
.pgs-order-view a { color: var(--pgs-order-accent); }
.pgs-order-view a:focus-visible, .pgs-order-view button:focus-visible, .pgs-order-view summary:focus-visible { outline: 3px solid #679dda; outline-offset: 4px; }
.pgs-order-view .pgs-order-back { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 20px; font-size: 13px; font-weight: 600; text-decoration: none; padding: 4px 0; }
.pgs-order-view .pgs-order-back:hover { text-decoration: underline; }
.pgs-order-view .pgs-order-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, .7fr); align-items: center; gap: 28px; padding: 30px; margin: 0 0 24px; border: 1px solid #eadde1; border-top: 4px solid var(--pgs-order-accent); border-radius: 18px; background: linear-gradient(115deg, #fff6f8 0%, #fff 65%); }
.pgs-order-view .pgs-order-eyebrow { margin: 0 0 8px; color: var(--pgs-order-accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pgs-order-view .pgs-order-heading h2 { margin: 0 0 15px !important; font-size: 30px !important; font-weight: 650 !important; overflow-wrap: anywhere; }
.pgs-order-view .pgs-order-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 13px; color: var(--pgs-order-muted); }
.pgs-order-view .pgs-order-meta time { color: var(--pgs-order-ink); font-weight: 500; }
.pgs-order-view .pgs-order-status { display: inline-flex; padding: 4px 11px; border-radius: 30px; border: 1px solid #e1d2d7; color: var(--pgs-order-accent); background: #fff; font-size: 12px; font-weight: 650; }
.pgs-order-view .pgs-order-summary { display: grid; gap: 14px; margin: 0; padding: 0 0 0 28px; border-left: 1px solid #eadde1; min-width: 0; }
.pgs-order-view .pgs-order-summary dt { margin: 0 0 3px; font-size: 12px; font-weight: 400; color: var(--pgs-order-muted); }
.pgs-order-view .pgs-order-summary dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.pgs-order-view .pgs-order-summary .pgs-order-total { font-size: 25px; line-height: 1.35; font-weight: 700; color: var(--pgs-order-accent); }
.pgs-order-view .pgs-order-content { display: grid; gap: 24px; min-width: 0; }
.pgs-order-view .woocommerce-order-details, .pgs-order-view .woocommerce-order-downloads, .pgs-order-view .pgs-order-notes { margin: 0 !important; padding: 26px; border: 1px solid #e4e8ef; border-radius: 16px; background: #fff; box-shadow: 0 4px 18px #24324705; min-width: 0; }
.pgs-order-view .woocommerce-order-details__title, .pgs-order-view .woocommerce-order-downloads__title, .pgs-order-view .pgs-order-notes h2 { margin: 0 0 20px !important; font-size: 20px !important; font-weight: 650 !important; }
.pgs-order-view table.shop_table { width: 100%; margin: 0 !important; padding: 0; border: 0 !important; border-collapse: collapse; border-spacing: 0; background: #fff; font: inherit; table-layout: fixed; }
.pgs-order-view table.shop_table th, .pgs-order-view table.shop_table td { padding: 15px 10px; border: 0; border-bottom: 1px solid #edf0f4; vertical-align: top; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; text-align: left; }
.pgs-order-view table.shop_table th:first-child, .pgs-order-view table.shop_table td:first-child { padding-left: 0; }
.pgs-order-view table.shop_table th:last-child, .pgs-order-view table.shop_table td:last-child { padding-right: 0; }
.pgs-order-view table.woocommerce-table--order-details thead th { padding-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--pgs-order-muted); font-weight: 600; }
.pgs-order-view table.woocommerce-table--order-details .product-total { width: 32%; text-align: right; }
.pgs-order-view table.woocommerce-table--order-details .product-name a { font-weight: 600; text-decoration: none; color: var(--pgs-order-ink); }
.pgs-order-view table.woocommerce-table--order-details .product-name a:hover { color: var(--pgs-order-accent); text-decoration: underline; }
.pgs-order-view .product-quantity { display: inline-block; margin-left: 5px; color: var(--pgs-order-muted); font-weight: 500; font-size: 12px; }
.pgs-order-view table.woocommerce-table--order-details tfoot th { color: var(--pgs-order-muted); font-weight: 400; }
.pgs-order-view table.woocommerce-table--order-details tfoot td { text-align: right; font-weight: 500; }
.pgs-order-view table.woocommerce-table--order-details tfoot tr:last-child th, .pgs-order-view table.woocommerce-table--order-details tfoot tr:last-child td { border-bottom: 0; padding-bottom: 0; color: var(--pgs-order-ink); font-weight: 700; }
.pgs-order-view .wc-item-meta { padding: 0; margin: 8px 0 0; list-style: none; color: var(--pgs-order-muted); font-size: 12px; }
.pgs-order-view .wc-item-meta p { display: inline; margin: 0; }
.pgs-order-view .pgs-account-shipments { margin: 0; padding: 26px; border-radius: 16px; background: #f9fbfe; }
.pgs-order-view .pgs-account-heading h2 { font-size: 20px !important; }
.pgs-order-view .pgs-order-notes { margin-top: 24px !important; }
.pgs-order-view .pgs-order-notes ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.pgs-order-view .pgs-order-notes li { margin: 0; padding: 0 0 0 15px; border-left: 2px solid #eadde1; }
.pgs-order-view .pgs-order-notes .comment-text { margin: 0; padding: 0; border: 0; }
.pgs-order-view .pgs-order-notes time { font-size: 12px; color: var(--pgs-order-muted); }
.pgs-order-view .pgs-order-notes p { margin: 6px 0 0; font-size: 14px; }
@media (max-width: 900px) {
    .pgs-order-view .pgs-order-header { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 24px; }
    .pgs-order-view .pgs-order-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-left: 0; border-top: 1px solid #eadde1; padding: 18px 0 0; gap: 18px; }
}
@media (max-width: 600px) {
    .pgs-order-view { font-size: 14px; }
    /* The account header cart and footer contact links remain available.
       Preserve the floating cart's close control if its panel is already open. */
    body.woocommerce-view-order .padma-messenger-fab { display: none !important; }
    body.woocommerce-view-order .xt_woofc:not(.xt_woofc-cart-open) { display: none !important; }
    .pgs-order-view .pgs-order-back { margin-bottom: 14px; }
    .pgs-order-view .pgs-order-header { padding: 20px 18px; gap: 18px; margin-bottom: 18px; border-radius: 14px; }
    .pgs-order-view .pgs-order-heading h2 { font-size: 25px !important; margin-bottom: 12px !important; }
    .pgs-order-view .pgs-order-meta { gap: 9px; font-size: 12px; }
    .pgs-order-view .pgs-order-summary { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 16px; }
    .pgs-order-view .pgs-order-summary .pgs-order-total { font-size: 23px; }
    .pgs-order-view .pgs-order-content { gap: 18px; }
    .pgs-order-view .woocommerce-order-details, .pgs-order-view .woocommerce-order-downloads, .pgs-order-view .pgs-order-notes, .pgs-order-view .pgs-account-shipments { padding: 20px 16px; border-radius: 14px; }
    .pgs-order-view .woocommerce-order-details__title, .pgs-order-view .woocommerce-order-downloads__title, .pgs-order-view .pgs-order-notes h2 { font-size: 18px !important; margin-bottom: 17px !important; }
    .pgs-order-view table.shop_table { min-width: 0 !important; max-width: 100% !important; width: 100% !important; }
    .pgs-order-view table.shop_table th, .pgs-order-view table.shop_table td { padding: 13px 6px; font-size: 13px; }
    .pgs-order-view table.woocommerce-table--order-details .product-total { width: 35%; }
    .pgs-order-view .pgs-account-heading h2 { font-size: 18px !important; }
    .pgs-order-view .pgs-account-heading p { font-size: 13px; margin-bottom: 16px; }
    .pgs-order-view .pgs-account-list .pgs-customer-card { padding: 15px; }
}
.padma-auth-dialog { position: relative; }
.padma-auth-transition.padma-auth-recovery {
    position: absolute; inset: 0; z-index: 2; display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; box-sizing: border-box; padding: 24px;
    background: #fff; color: #26364a; text-align: center;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}
.padma-auth-transition.padma-auth-recovery::before { display: none; animation: none; }
.padma-auth-recovery button {
    border: 0; background: transparent; color: #2d79f3;
    text-decoration: underline; cursor: pointer;
}
.padma-auth-in-progress .padma-auth-close { z-index: 3; }
