/* Pragati account area (my-account/*): Meesho-like profile, orders, addresses, wallet, wishlist, tickets.
   Loaded on every page, so every rule is scoped: .pg-account-page (page wrapper), .pg-acc-nav (account menu,
   also printed as a strip on the chat page) and .pg-acc-modal (modals that live outside the page wrapper).
   Builds on the page kit in pragati-shop.css (.pg-panel, .pg-btn, .pg-badge, .pg-line-item, .pg-price-details...). */

/* ======================================================================
   shell
   ====================================================================== */
/* body is a flex column in the stock theme: without this the kit min-height lets the page shrink under the footer */
.pg-account-page { flex-shrink: 0; }
.pg-account-page .pg-acc-main { min-width: 0; }
.pg-account-page .pg-page-head { align-items: center; }
.pg-account-page .pg-page-head .pg-btn { flex: 0 0 auto; }
.pg-account-page .pg-panel-title { font-size: 17px; }
.pg-account-page .pg-panel + .pg-panel { margin-top: 16px; }
.pg-account-page .pg-empty { padding: 36px 16px; }
.pg-account-page .pg-empty h2, .pg-account-page .pg-empty h3 { font-size: 18px; }
.pg-account-page .pg-acc-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; margin-left: 6px; padding: 0 8px; font-size: 13px; font-weight: 700; vertical-align: middle; color: var(--pg-mocha); background: var(--pg-gold-soft); border-radius: 999px; }
.pg-account-page a:not(.pg-btn):not(.pg-chip):focus-visible { outline: 2px solid var(--pg-gold); outline-offset: 2px; border-radius: 4px; }
.pg-account-page .pg-badge i { font-size: 14px; line-height: 1; }
.pg-account-page .pg-dot { margin: 0 3px; color: #C9B9A6; }

/* ======================================================================
   account menu (my-account-sidebar.php)
   ====================================================================== */
.pg-acc-nav { position: relative; }
.pg-acc-nav .pg-account-user { position: relative; }
.pg-acc-nav .pg-acc-user-text { display: flex; flex-direction: column; min-width: 0; }
.pg-acc-nav .pg-acc-hello { font-size: 12px; color: var(--pg-muted); }
.pg-acc-nav .pg-account-name { overflow: hidden; line-height: 1.3; white-space: nowrap; text-overflow: ellipsis; text-transform: capitalize; }
.pg-acc-nav .pg-acc-user-edit { display: none; }
.pg-acc-nav ul { position: relative; margin: 0; padding: 0; list-style: none; }
.pg-acc-nav li { margin: 0; }
.pg-acc-nav a { position: relative; }
.pg-acc-nav a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pg-acc-nav a.active::before { content: ""; position: absolute; top: 9px; bottom: 9px; left: 0; width: 3px; background: var(--pg-mocha); border-radius: 0 3px 3px 0; }
.pg-acc-nav .pg-acc-logout { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--pg-line); }
.pg-acc-nav .pg-acc-logout a, .pg-acc-nav .pg-acc-logout a i { color: var(--pg-muted); }
.pg-acc-nav .pg-acc-logout a:hover, .pg-acc-nav .pg-acc-logout a:hover i { color: var(--pg-mocha); }

@media (min-width: 992px) and (min-height: 820px) {
    .pg-account-page .pg-acc-nav:not(.pg-acc-nav--strip) { position: sticky; top: var(--pg-sticky-top); }
}

/* phones + tablets: user row on top, then one swipeable row of chips */
@media (max-width: 991.98px) {
    .pg-acc-nav { padding: 0; background: transparent; border: 0; border-radius: 0; }
    .pg-acc-nav .pg-account-user { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); }
    .pg-acc-nav .pg-account-avatar { width: 42px; height: 42px; font-size: 17px; }
    .pg-acc-nav .pg-acc-user-text { flex: 1 1 auto; }
    .pg-acc-nav .pg-acc-hello { display: none; }
    .pg-acc-nav .pg-acc-user-edit { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; font-size: 17px; color: var(--pg-mocha); background: var(--pg-gold-soft); border-radius: 50%; text-decoration: none; }
    .pg-acc-nav ul { display: flex; gap: 8px; margin: 0 -12px; padding: 2px 12px 4px; overflow-x: auto; scroll-padding: 0 12px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .pg-acc-nav ul::-webkit-scrollbar { display: none; }
    .pg-acc-nav li { flex: 0 0 auto; scroll-snap-align: start; }
    .pg-acc-nav a { gap: 7px; padding: 8px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; background: #fff; border: 1px solid #DCCFBD; border-radius: 999px; }
    .pg-acc-nav a i { width: auto; font-size: 16px; }
    .pg-acc-nav a.active { color: #fff !important; background: var(--pg-mocha); border-color: var(--pg-mocha); }
    .pg-acc-nav a.active i { color: #fff !important; }
    .pg-acc-nav a.active::before { display: none; }
    .pg-acc-nav .pg-acc-logout { margin: 0; padding: 0; border: 0; }
    .pg-acc-dashboard .pg-acc-nav .pg-account-user { display: none; }
}

/* strip version (chat page): chips only */
.pg-acc-nav--strip { padding: 10px; }
.pg-acc-nav--strip ul { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-acc-nav--strip a { gap: 7px; padding: 8px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; background: #fff; border: 1px solid #DCCFBD; border-radius: 999px; }
.pg-acc-nav--strip a i { width: auto; font-size: 16px; }
.pg-acc-nav--strip a.active { color: #fff !important; background: var(--pg-mocha); border-color: var(--pg-mocha); }
.pg-acc-nav--strip a.active i { color: #fff !important; }
.pg-acc-nav--strip a.active::before { display: none; }
.pg-acc-nav--strip .pg-acc-logout { margin: 0; padding: 0; border: 0; }
@media (max-width: 991.98px) {
    .pg-acc-nav--strip ul { flex-wrap: nowrap; }
}

/* ======================================================================
   overview (dashboard.php)
   ====================================================================== */
.pg-account-page .pg-acc-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; color: var(--pg-cream); background: linear-gradient(120deg, var(--pg-espresso) 0%, var(--pg-mocha) 100%); border-radius: var(--pg-radius); }
.pg-account-page .pg-acc-hero-avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 64px; height: 64px; overflow: hidden; font-size: 26px; font-weight: 700; color: var(--pg-espresso); background: var(--pg-gold); border: 3px solid rgba(255, 249, 240, .35); border-radius: 50%; }
.pg-account-page .pg-acc-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pg-account-page .pg-acc-hero-text { flex: 1 1 0; min-width: 0; }
.pg-account-page .pg-acc-hero-hello { margin: 0; font-size: 14px; color: var(--pg-gold-light); }
.pg-account-page .pg-acc-hero-name { margin: 0 0 4px; overflow: hidden; font-size: 24px; font-weight: 700; line-height: 1.25; color: #fff; white-space: nowrap; text-overflow: ellipsis; text-transform: capitalize; }
.pg-account-page .pg-acc-hero-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 14px; color: rgba(255, 249, 240, .82); }
.pg-account-page .pg-acc-hero-meta span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.pg-account-page .pg-acc-hero-meta i { color: var(--pg-gold); }
.pg-account-page .pg-acc-hero-edit { flex: 0 0 auto; }

.pg-account-page .pg-acc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.pg-account-page .pg-acc-stat { display: flex; flex-direction: column; gap: 2px; padding: 16px; color: var(--pg-text); text-decoration: none; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); transition: border-color .15s, box-shadow .15s; }
.pg-account-page .pg-acc-stat:hover { color: var(--pg-text); border-color: var(--pg-gold-light); box-shadow: var(--pg-shadow); }
.pg-account-page .pg-acc-stat i { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 8px; font-size: 19px; color: var(--pg-mocha); background: var(--pg-gold-soft); border-radius: 10px; }
.pg-account-page .pg-acc-stat strong { overflow: hidden; font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--pg-espresso); white-space: nowrap; text-overflow: ellipsis; }
.pg-account-page .pg-acc-stat span { font-size: 13px; color: var(--pg-muted); }

.pg-account-page .pg-acc-mini-list { display: flex; flex-direction: column; }
.pg-account-page .pg-acc-mini { display: flex; align-items: center; gap: 14px; padding: 12px 4px; color: var(--pg-text); text-decoration: none; border-radius: var(--pg-radius-sm); }
.pg-account-page .pg-acc-mini + .pg-acc-mini { border-top: 1px solid var(--pg-line); }
.pg-account-page .pg-acc-mini:hover { color: var(--pg-text); background: #FFFCF7; }
.pg-account-page .pg-acc-mini-img { flex: 0 0 auto; width: 56px; height: 64px; overflow: hidden; background: var(--pg-cream); border: 1px solid var(--pg-line); border-radius: var(--pg-radius-sm); }
.pg-account-page .pg-acc-mini-img img { width: 100%; height: 100%; object-fit: contain; }
.pg-account-page .pg-acc-mini-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 3px; min-width: 0; }
.pg-account-page .pg-acc-mini-name { overflow: hidden; font-size: 15px; font-weight: 600; color: var(--pg-text); white-space: nowrap; text-overflow: ellipsis; }
.pg-account-page .pg-acc-mini-name em { font-style: normal; font-weight: 500; color: var(--pg-muted); }
.pg-account-page .pg-acc-mini-meta { font-size: 13px; color: var(--pg-muted); }
.pg-account-page .pg-acc-mini-price { flex: 0 0 auto; min-width: 72px; font-size: 15px; font-weight: 700; text-align: right; color: var(--pg-espresso); }
.pg-account-page .pg-acc-mini-go { flex: 0 0 auto; font-size: 20px; color: var(--pg-muted); }
.pg-account-page .pg-acc-empty-sm { padding: 18px 8px 8px; }

.pg-account-page .pg-acc-help { display: flex; align-items: center; gap: 16px; }
.pg-account-page .pg-acc-help-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 48px; height: 48px; font-size: 24px; color: var(--pg-cream); background: var(--pg-mocha); border-radius: 50%; }
.pg-account-page .pg-acc-help-text { flex: 1 1 auto; min-width: 0; }
.pg-account-page .pg-acc-help-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 767.98px) {
    .pg-account-page .pg-acc-hero { flex-wrap: wrap; gap: 14px; padding: 18px; }
    .pg-account-page .pg-acc-hero-avatar { width: 54px; height: 54px; font-size: 22px; }
    .pg-account-page .pg-acc-hero-name { font-size: 20px; }
    .pg-account-page .pg-acc-hero-edit { width: 100%; }
    .pg-account-page .pg-acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
    .pg-account-page .pg-acc-stat { padding: 14px; }
    .pg-account-page .pg-acc-stat strong { font-size: 18px; }
    .pg-account-page .pg-acc-mini { position: relative; flex-wrap: wrap; gap: 6px 12px; padding-right: 22px; }
    .pg-account-page .pg-acc-mini-body { flex-basis: calc(100% - 70px); }
    .pg-account-page .pg-acc-mini .pg-badge { margin-left: 70px; }
    .pg-account-page .pg-acc-mini-price { min-width: 0; margin-left: auto; }
    .pg-account-page .pg-acc-mini-go { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }
    .pg-account-page .pg-acc-help { flex-wrap: wrap; }
    .pg-account-page .pg-acc-help-actions { width: 100%; }
    .pg-account-page .pg-acc-help-actions .pg-btn { flex: 1 1 0; }
}

/* ======================================================================
   my orders (orders.php)
   ====================================================================== */
.pg-account-page .pg-orders { display: flex; flex-direction: column; gap: 14px; }
.pg-account-page .pg-order { overflow: hidden; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); transition: box-shadow .15s; }
.pg-account-page .pg-order:hover { box-shadow: var(--pg-shadow); }
.pg-account-page .pg-order-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 12px 18px; background: var(--pg-cream); border-bottom: 1px solid var(--pg-line); }
.pg-account-page .pg-order-ids { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.pg-account-page .pg-order-id { font-size: 14px; color: var(--pg-muted); }
.pg-account-page .pg-order-id strong { font-weight: 700; color: var(--pg-espresso); }
.pg-account-page .pg-order-date { font-size: 13px; color: var(--pg-muted); }
.pg-account-page .pg-order-body { padding: 0 18px; }
.pg-account-page .pg-order .pg-line-name { font-size: 16px; font-weight: 600; }
.pg-account-page .pg-order .pg-line-name a:hover { color: var(--pg-mocha); }
.pg-account-page .pg-order-item-status { margin-top: 8px; }
.pg-account-page .pg-order-otp { margin: 8px 0 0; font-size: 13px; color: var(--pg-muted); }
.pg-account-page .pg-order-otp strong { letter-spacing: .08em; color: var(--pg-espresso); }
.pg-account-page .pg-order-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 12px 18px; border-top: 1px solid var(--pg-line); }
.pg-account-page .pg-order-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-size: 14px; color: var(--pg-muted); }
.pg-account-page .pg-order-total strong { font-size: 18px; color: var(--pg-espresso); }
.pg-account-page .pg-order-total small { font-size: 13px; }
.pg-account-page .pg-order-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* CodeIgniter pagination (orders) */
.pg-account-page .pg-acc-pagination { margin-top: 22px; }
.pg-account-page .pg-acc-pagination .pagination { flex-wrap: wrap; gap: 6px; margin: 0; }
.pg-account-page .pg-acc-pagination .page-link { display: flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; font-weight: 600; color: var(--pg-mocha); background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius-sm) !important; }
.pg-account-page .pg-acc-pagination .page-link:hover { color: var(--pg-mocha); background: var(--pg-gold-soft); border-color: var(--pg-gold-light); }
.pg-account-page .pg-acc-pagination .page-item.active .page-link { color: #fff; background: var(--pg-mocha); border-color: var(--pg-mocha); }

@media (max-width: 767.98px) {
    .pg-account-page .pg-order-head, .pg-account-page .pg-order-foot { padding: 12px 14px; }
    .pg-account-page .pg-order-body { padding: 0 14px; }
    .pg-account-page .pg-order .pg-line-name { font-size: 15px; }
    .pg-account-page .pg-order-actions { width: 100%; }
    .pg-account-page .pg-order-actions .pg-btn { flex: 1 1 0; }
}

/* ======================================================================
   order details (order-details.php)
   ====================================================================== */
.pg-account-page .pg-od-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pg-account-page .pg-od-back { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; font-size: 20px; color: var(--pg-mocha); text-decoration: none; background: #fff; border: 1px solid var(--pg-line); border-radius: 50%; }
.pg-account-page .pg-od-back:hover { color: var(--pg-mocha); background: var(--pg-gold-soft); }
.pg-account-page .pg-od-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-account-page .pg-od-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 18px; }
.pg-account-page .pg-od-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pg-account-page .pg-od-col > .pg-panel + .pg-panel, .pg-account-page .pg-od-side > .pg-panel + .pg-panel { margin-top: 0; }
.pg-account-page .pg-od-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 1200px) and (min-height: 820px) {
    .pg-account-page .pg-od-side { position: sticky; top: var(--pg-sticky-top); }
}
@media (max-width: 1199.98px) {
    .pg-account-page .pg-od-grid { grid-template-columns: minmax(0, 1fr); }
}

.pg-account-page .pg-od-bank form { margin: 0; }
.pg-account-page .pg-od-bank-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pg-account-page .pg-od-bank-files { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

.pg-account-page .pg-od-item { padding: 4px 20px 18px; }
.pg-account-page .pg-od-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pg-account-page .pg-od-item .pg-line-name { font-size: 16px; font-weight: 600; }
.pg-account-page .pg-od-item .pg-line-name a:hover { color: var(--pg-mocha); }
.pg-account-page .pg-od-item-top .pg-badge { flex: 0 0 auto; }
.pg-account-page .pg-od-seller { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--pg-muted); }
.pg-account-page .pg-od-seller i { color: var(--pg-mocha); }
.pg-account-page .pg-od-courier { margin: 2px 0 6px; padding: 12px 14px; font-size: 14px; background: var(--pg-cream); border-radius: var(--pg-radius-sm); }
.pg-account-page .pg-od-courier h3 { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: var(--pg-espresso); }
.pg-account-page .pg-od-courier p { margin: 2px 0; color: var(--pg-muted); overflow-wrap: anywhere; }
.pg-account-page .pg-od-courier strong { color: var(--pg-espresso); }
.pg-account-page .pg-od-item-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pg-line); }
.pg-account-page .pg-od-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--pg-muted); }

/* tracking: horizontal stepper, vertical on phones */
.pg-account-page .pg-track { display: flex; margin: 8px 0 0; padding: 18px 0 2px; list-style: none; border-top: 1px solid var(--pg-line); }
.pg-account-page .pg-track-step { position: relative; display: flex; flex: 1 1 0; flex-direction: column; align-items: center; gap: 8px; min-width: 0; text-align: center; }
.pg-account-page .pg-track-step + .pg-track-step::before { content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 3px; background: #E8DCCB; }
.pg-account-page .pg-track-step.is-done + .pg-track-step.is-done::before { background: var(--pg-gold); }
.pg-account-page .pg-track-step.is-cancel::before { background: var(--pg-danger) !important; }
.pg-account-page .pg-track-dot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 27px; height: 27px; font-size: 15px; color: #fff; background: #fff; border: 2px solid #D9CBB8; border-radius: 50%; }
.pg-account-page .pg-track-step.is-done .pg-track-dot { background: var(--pg-mocha); border-color: var(--pg-mocha); }
.pg-account-page .pg-track-step.is-current .pg-track-dot { box-shadow: 0 0 0 5px var(--pg-gold-soft); }
.pg-account-page .pg-track-step.is-cancel .pg-track-dot { background: var(--pg-danger); border-color: var(--pg-danger); box-shadow: 0 0 0 5px var(--pg-danger-soft); }
.pg-account-page .pg-track-text { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.pg-account-page .pg-track-label { font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--pg-text); }
.pg-account-page .pg-track-step:not(.is-done) .pg-track-label { font-weight: 600; color: var(--pg-muted); }
.pg-account-page .pg-track-step.is-cancel .pg-track-label { color: var(--pg-danger); }
.pg-account-page .pg-track-date { font-size: 12px; line-height: 1.35; color: var(--pg-muted); }
@media (max-width: 575.98px) {
    .pg-account-page .pg-track { flex-direction: column; padding-top: 16px; }
    .pg-account-page .pg-track-step { flex-direction: row; align-items: flex-start; gap: 12px; padding-bottom: 18px; text-align: left; }
    .pg-account-page .pg-track-step:last-child { padding-bottom: 0; }
    .pg-account-page .pg-track-step + .pg-track-step::before { display: none; }
    .pg-account-page .pg-track-step:not(:last-child)::after { content: ""; position: absolute; top: 27px; bottom: 0; left: 12px; width: 3px; background: #E8DCCB; }
    .pg-account-page .pg-track-step.is-done:has(+ .pg-track-step.is-done)::after { background: var(--pg-gold); }
    .pg-account-page .pg-track-step:has(+ .pg-track-step.is-cancel)::after { background: var(--pg-danger); }
    .pg-account-page .pg-track-text { padding: 3px 0 0; }
}

.pg-account-page .pg-od-address .pg-panel-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 16px; }
.pg-account-page .pg-od-address .pg-panel-title i, .pg-account-page .pg-od-phone i, .pg-account-page .pg-od-slot i { color: var(--pg-mocha); }
.pg-account-page .pg-od-name { margin: 0 0 4px; font-weight: 700; color: var(--pg-espresso); text-transform: capitalize; }
.pg-account-page .pg-od-lines { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: var(--pg-text); }
.pg-account-page .pg-od-phone, .pg-account-page .pg-od-slot { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 14px; color: var(--pg-muted); }
.pg-account-page .pg-od-side .pg-price-details { padding: 18px 20px; }
.pg-account-page .pg-od-paid { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--pg-line); }
.pg-account-page .pg-od-paid strong { color: var(--pg-espresso); }
.pg-account-page .pg-od-paid i { font-size: 16px; color: var(--pg-mocha); }
.pg-account-page .pg-od-actions { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.pg-account-page .pg-od-help { display: flex; align-items: center; gap: 10px; padding: 6px 4px; font-weight: 600; color: var(--pg-mocha); text-decoration: none; }
.pg-account-page .pg-od-help span { flex: 1 1 auto; }
.pg-account-page .pg-od-help i { font-size: 18px; }
.pg-account-page .pg-od-help:hover { color: var(--pg-espresso); }

@media (max-width: 767.98px) {
    .pg-account-page .pg-od-head-actions { width: 100%; }
    .pg-account-page .pg-od-head-actions .pg-btn { flex: 1 1 0; }
    .pg-account-page .pg-od-item { padding: 2px 14px 14px; }
    .pg-account-page .pg-od-item-top { flex-direction: column; gap: 6px; }
    .pg-account-page .pg-od-item-actions .pg-btn { flex: 1 1 0; }
}

/* ======================================================================
   modals used by the account pages (return item, addresses, wallet, tickets)
   ====================================================================== */
.pg-acc-modal .modal-content { overflow: hidden; background: #fff; border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(43, 33, 24, .25); }
.pg-acc-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--pg-line); }
.pg-acc-modal .modal-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--pg-espresso); }
.pg-acc-modal .modal-body { padding: 18px 22px; }
.pg-acc-modal .modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--pg-line); }
.pg-acc-modal .modal-footer > * { margin: 0; }
.pg-acc-modal .btn-close, .pg-acc-modal .close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; margin: 0; padding: 0; font-size: 22px; line-height: 1; color: var(--pg-mocha); background-color: var(--pg-cream); background-size: 12px; border: 0; border-radius: 50%; opacity: 1; box-shadow: none; }
.pg-acc-modal .btn-close:hover, .pg-acc-modal .close:hover { background-color: var(--pg-gold-soft); }
.pg-acc-modal .pg-acc-modal-sub { margin: 0 0 12px; font-size: 14px; color: var(--pg-muted); }
.pg-acc-modal label { color: var(--pg-text); }
.pg-acc-modal .pg-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--pg-text); }
.pg-acc-modal .form-group { margin-bottom: 14px; }
.pg-acc-modal .pg-acc-modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--pg-line); }
.pg-acc-modal .pg-acc-modal-actions .pg-btn { min-width: 130px; }
/* option rows (return reasons, wallet payment methods): the kit's ".pg-form label" is display:block */
.pg-acc-modal .pg-option { align-items: center; margin: 0; }
.pg-acc-modal .pg-option + .pg-option { margin-top: 10px; }
.pg-acc-modal .pg-form label.pg-option { display: flex; align-items: center; gap: 12px; margin-bottom: 0; font-size: 15px; font-weight: 500; }
.pg-acc-modal .pg-form label.pg-option + label.pg-option { margin-top: 10px; }
.pg-acc-modal .pg-option .pg-option-title { font-weight: 600; color: var(--pg-text); }
/* the theme sets appearance:none !important on every input, so draw the radio */
.pg-acc-modal .pg-option input[type="radio"]:not(.form-check-input) { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; cursor: pointer; background: #fff; border: 2px solid #CDBBA6; border-radius: 50%; transition: border-color .15s, box-shadow .15s; }
.pg-acc-modal .pg-option input[type="radio"]:not(.form-check-input):checked { background: var(--pg-mocha); border-color: var(--pg-mocha); box-shadow: inset 0 0 0 3px #fff; }
.pg-acc-modal .pg-option input[type="radio"]:not(.form-check-input):focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(212, 160, 23, .45); }
.pg-acc-modal .pg-option input[type="radio"]:not(.form-check-input):checked:focus-visible { box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px rgba(212, 160, 23, .45); }
.pg-acc-modal .pg-reason-img { flex: 0 0 auto; width: 36px; height: 36px; object-fit: cover; border-radius: 8px; }
.pg-acc-modal .pg-reason-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 36px; height: 36px; font-size: 18px; color: var(--pg-mocha); background: var(--pg-gold-soft); border-radius: 8px; }
.pg-acc-modal .pg-return-upload { margin-top: 16px; }

/* the return video: required, and the one thing the whole dispute hangs off, so it leads the form
   and reads as part of it rather than as another file input tacked on the end */
.pg-acc-modal .pg-return-video {
    padding: 14px;
    border: 1px solid var(--pg-gold, #D4A017);
    border-radius: 10px;
    background: var(--pg-cream, #FFF9F0);
}
.pg-acc-modal .pg-return-video > label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--pg-mocha, #5C3A21);
}
.pg-acc-modal .pg-req { color: #c0392b; margin-left: 2px; }
.pg-acc-modal .pg-return-hint {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #6b5847;
}
.pg-acc-modal .pg-return-video-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--pg-mocha, #5C3A21);
    word-break: break-word;
}
.pg-acc-modal .pg-return-video-note.is-bad { color: #c0392b; font-weight: 600; }
/* a file input is a tap target on a phone like anything else */
.pg-acc-modal .pg-return-upload input[type="file"] { min-height: 44px; }/* stock theme JS gives .progress-wrap a stale "scrollbar" margin on every modal open, which stretches the floating chat button */
body.modal-open:has(.pg-account-page) .fixed-icon .progress-wrap { margin-right: 0 !important; }
@media (max-width: 575.98px) {
    .pg-acc-modal .modal-dialog { margin: 12px; }
    .pg-acc-modal .modal-header, .pg-acc-modal .modal-body, .pg-acc-modal .modal-footer { padding-right: 16px; padding-left: 16px; }
    .pg-acc-modal .modal-footer .pg-btn { flex: 1 1 0; }
}

/* ======================================================================
   forms (profile, address modals, wallet, tickets)
   ====================================================================== */
.pg-account-page .pg-form .form-group, .pg-acc-modal .pg-form .form-group { margin-bottom: 16px; }
.pg-account-page .pg-form .form-control[readonly], .pg-acc-modal .pg-form .form-control[readonly] { color: var(--pg-muted); background: #FAF6F0; }
.pg-account-page .pg-acc-grid, .pg-acc-modal .pg-acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.pg-account-page .pg-acc-span-2, .pg-acc-modal .pg-acc-span-2 { grid-column: 1 / -1; }
.pg-account-page .pg-acc-form-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; color: var(--pg-espresso); }
.pg-account-page .pg-acc-form-sub { margin: -8px 0 14px; font-size: 13px; color: var(--pg-muted); }
.pg-account-page .pg-acc-form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.pg-account-page .pg-acc-form-actions .pg-btn { min-width: 170px; }
.pg-account-page #error_box.alert, .pg-acc-modal #error_box.alert { margin: 14px 0 0; font-size: 14px; border-radius: var(--pg-radius-sm); }
.pg-account-page .pg-acc-file { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
/* labels styled as buttons/chips: the kit's ".pg-form label" is display:block */
.pg-account-page .pg-form label.pg-btn { display: inline-flex; margin: 0; font-size: 13px; }
.pg-acc-modal .pg-form label.pg-chip { display: inline-flex; margin: 0; }

/* ======================================================================
   profile (profile.php)
   ====================================================================== */
.pg-account-page .pg-acc-profile-card { padding: 24px; }
.pg-account-page .pg-acc-avatar-row { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--pg-line); }
.pg-account-page .profile_image { flex: 0 0 auto; margin: 0; }
.pg-account-page .profile_image .avatar { width: 92px; height: 92px; object-fit: cover; background: var(--pg-cream); border: 3px solid var(--pg-gold-soft); border-radius: 50%; box-shadow: 0 4px 14px rgba(43, 33, 24, .12); }
.pg-account-page .pg-acc-avatar-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.pg-account-page .pg-acc-avatar-name { margin: 0; overflow: hidden; max-width: 100%; font-size: 19px; font-weight: 700; color: var(--pg-espresso); white-space: nowrap; text-overflow: ellipsis; text-transform: capitalize; }
.pg-account-page .pg-acc-avatar-btn { margin: 0; }
.pg-account-page .pg-acc-avatar-hint { font-size: 12px; color: var(--pg-muted); }
.pg-account-page .pg-acc-password { margin-top: 6px; padding-top: 22px; border-top: 1px solid var(--pg-line); }

@media (max-width: 767.98px) {
    .pg-account-page .pg-acc-profile-card { padding: 18px 16px; }
    .pg-account-page .pg-acc-avatar-row { gap: 14px; }
    .pg-account-page .profile_image .avatar { width: 74px; height: 74px; }
    .pg-account-page .pg-acc-grid, .pg-acc-modal .pg-acc-grid { grid-template-columns: minmax(0, 1fr); }
    .pg-account-page .pg-acc-form-actions .pg-btn { flex: 1 1 auto; }
}

/* ======================================================================
   saved addresses (address.php + account.js cards)
   ====================================================================== */
.pg-account-page .pg-addr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pg-account-page .pg-addr-grid:empty { display: none; }
.pg-account-page .pg-addr-grid > .pg-addr-empty, .pg-account-page .pg-addr-grid > .pg-addr-loading { grid-column: 1 / -1; }
.pg-account-page .pg-addr-loading { padding: 40px 16px; font-size: 14px; color: var(--pg-muted); text-align: center; background: #fff; border: 1px dashed var(--pg-line); border-radius: var(--pg-radius); }
.pg-account-page .pg-addr-card { display: flex; flex-direction: column; padding: 18px 18px 16px; background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); transition: border-color .15s, box-shadow .15s; }
.pg-account-page .pg-addr-card:hover { box-shadow: var(--pg-shadow); }
.pg-account-page .pg-addr-card.is-default { border-color: var(--pg-mocha); box-shadow: inset 0 0 0 1px var(--pg-mocha); }
.pg-account-page .pg-addr-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 26px; margin-bottom: 10px; }
.pg-account-page .pg-addr-type { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: 12px; font-weight: 700; letter-spacing: .03em; color: var(--pg-mocha); text-transform: uppercase; background: var(--pg-cream); border: 1px solid var(--pg-line); border-radius: 999px; }
.pg-account-page .pg-addr-type i { font-size: 14px; }
.pg-account-page .pg-addr-name { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--pg-espresso); text-transform: capitalize; }
.pg-account-page .pg-addr-lines { flex: 1 1 auto; margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--pg-text); overflow-wrap: anywhere; }
.pg-account-page .pg-addr-phone { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--pg-text); }
.pg-account-page .pg-addr-phone i { color: var(--pg-mocha); }
.pg-account-page .pg-addr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding-top: 14px; border-top: 1px solid var(--pg-line); }
.pg-account-page .pg-addr-actions .pg-link { margin-left: auto; font-size: 14px; }
.pg-account-page .pg-addr-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px; padding: 18px; font-size: 15px; font-weight: 700; color: var(--pg-mocha); background: #FFFCF7; border: 2px dashed var(--pg-gold-light); border-radius: var(--pg-radius); cursor: pointer; transition: background-color .15s, border-color .15s; }
.pg-account-page .pg-addr-add i { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; font-size: 24px; color: #fff; background: var(--pg-mocha); border-radius: 50%; }
.pg-account-page .pg-addr-add:hover { background: var(--pg-gold-soft); border-color: var(--pg-gold); }
.pg-account-page .pg-addr-add:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(212, 160, 23, .45); }
/* the bootstrap-table stays in the page for the stock JS; once the cards are drawn only its pager (if any) shows */
.pg-account-page .pg-addr-js .pg-addr-table .fixed-table-toolbar,
.pg-account-page .pg-addr-js .pg-addr-table .fixed-table-container,
.pg-account-page .pg-addr-js .pg-addr-table .pagination-detail { display: none !important; }
.pg-account-page .pg-addr-js:not(.has-pages) .pg-addr-table { display: none; }
.pg-account-page .pg-addr-js .pg-addr-table .fixed-table-pagination { margin-top: 12px; }

/* address type chips (radios stay in the form, visually hidden) */
.pg-acc-modal .pg-addr-types { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-acc-modal .pg-acc-radio { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
.pg-acc-modal .pg-addr-types .pg-chip { margin: 0; font-size: 14px; font-weight: 600; }
.pg-acc-modal .pg-addr-types .pg-chip i { font-size: 16px; }
.pg-acc-modal .pg-acc-radio:checked + .pg-chip i { color: #fff; }
.pg-acc-modal .pg-acc-radio:focus-visible + .pg-chip { box-shadow: 0 0 0 3px rgba(212, 160, 23, .45); }
.pg-acc-modal #save-address-result:empty, .pg-acc-modal #edit-address-result:empty { display: none; }
/* select2 (city) inside the address modals */
.pg-acc-modal .select2-container { width: 100% !important; }
.pg-acc-modal .select2-container .select2-selection--single { display: flex; align-items: center; height: 46px !important; min-height: 46px; padding: 0 8px; background: #fff; border: 1px solid #DCCFBD !important; border-radius: var(--pg-radius-sm) !important; }
.pg-acc-modal .select2-container .select2-selection--single .select2-selection__rendered { padding-left: 6px; line-height: 44px; color: var(--pg-text); }
.pg-acc-modal .select2-container .select2-selection--single .select2-selection__arrow { top: 50%; height: 44px; transform: translateY(-50%); }
.pg-acc-modal .select2-container--focus .select2-selection--single, .pg-acc-modal .select2-container--open .select2-selection--single { border-color: var(--pg-gold) !important; box-shadow: 0 0 0 3px rgba(212, 160, 23, .22); }

@media (max-width: 767.98px) {
    .pg-account-page .pg-addr-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .pg-account-page .pg-addr-add { flex-direction: row; min-height: 96px; }
    .pg-acc-address .pg-page-head > .pg-btn { width: 100%; }
    .pg-acc-modal .pg-acc-modal-actions .pg-btn { flex: 1 1 0; min-width: 0; }
}

/* ======================================================================
   wallet (wallet.php)
   ====================================================================== */
.pg-account-page .pg-wallet-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 24px; color: var(--pg-cream); background: linear-gradient(120deg, var(--pg-espresso) 0%, var(--pg-mocha) 100%); border-radius: var(--pg-radius); }
.pg-account-page .pg-wallet-main { display: flex; align-items: center; gap: 16px; }
.pg-account-page .pg-wallet-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 56px; height: 56px; font-size: 28px; color: var(--pg-espresso); background: var(--pg-gold); border-radius: 14px; }
.pg-account-page .pg-wallet-label { margin: 0; font-size: 14px; color: var(--pg-gold-light); }
.pg-account-page .pg-wallet-amount { margin: 0; font-size: 32px; font-weight: 800; line-height: 1.15; color: #fff; }
.pg-account-page .pg-wallet-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pg-account-page .pg-wallet-btn-light { color: #fff !important; background: transparent; border-color: rgba(255, 249, 240, .65); }
.pg-account-page .pg-wallet-btn-light:hover, .pg-account-page .pg-wallet-btn-light:focus { color: var(--pg-espresso) !important; background: var(--pg-cream); border-color: var(--pg-cream); }
.pg-account-page .pg-wallet-note { margin: 12px 0 16px; }
.pg-acc-modal .pg-wallet-methods .pg-note { margin-bottom: 10px; }
.pg-acc-modal .payment-gateway-images { width: auto; max-width: 92px; height: 26px; object-fit: contain; }
.pg-acc-modal .ship-title-detail { margin-top: 4px; }
.pg-acc-modal #stripe_div { margin-top: 10px; }
.pg-acc-modal #stripe_div p:empty { display: none; }
.pg-acc-modal .result-message.hidden { display: none; }
@media (max-width: 767.98px) {
    .pg-account-page .pg-wallet-card { padding: 18px; }
    .pg-account-page .pg-wallet-amount { font-size: 28px; }
    .pg-account-page .pg-wallet-actions { width: 100%; }
    .pg-account-page .pg-wallet-actions .pg-btn { flex: 1 1 0; padding: 0 12px; }
}

/* ======================================================================
   bootstrap-table lists (wallet, transactions, notifications, tickets)
   ====================================================================== */
.pg-account-page .pg-acc-table-panel { padding: 18px 20px; }
.pg-account-page .pg-acc-table-panel .pg-panel-head { margin-bottom: 4px; }
.pg-account-page .bootstrap-table .fixed-table-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 12px; }
.pg-account-page .bootstrap-table .fixed-table-toolbar::after { display: none; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .search, .pg-account-page .bootstrap-table .fixed-table-toolbar .columns, .pg-account-page .bootstrap-table .fixed-table-toolbar .bs-bars { float: none !important; margin: 0 !important; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .search { order: -1; flex: 1 1 220px; max-width: 320px; margin-right: auto !important; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .search input { width: 100%; height: 40px; padding: 0 12px 0 38px; font-size: 14px; color: var(--pg-text); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2374655A' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center; border: 1px solid #DCCFBD; border-radius: var(--pg-radius-sm); box-shadow: none; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .search input:focus { border-color: var(--pg-gold); outline: 0; box-shadow: 0 0 0 3px rgba(212, 160, 23, .22); }
.pg-account-page .bootstrap-table .fixed-table-toolbar .columns { display: flex; gap: 6px; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .columns > .btn, .pg-account-page .bootstrap-table .fixed-table-toolbar .columns .btn-group > .btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 40px; height: 40px; padding: 0 10px; color: var(--pg-mocha) !important; background: #fff !important; border: 1px solid #DCCFBD !important; border-radius: var(--pg-radius-sm) !important; box-shadow: none !important; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .columns .btn:hover { background: var(--pg-gold-soft) !important; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .dropdown-toggle::after { display: none; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .dropdown-menu { padding: 6px; border: 1px solid var(--pg-line); border-radius: 10px; box-shadow: var(--pg-shadow); }
.pg-account-page .bootstrap-table .fixed-table-toolbar .dropdown-item, .pg-account-page .bootstrap-table .fixed-table-toolbar .dropdown-menu label { font-size: 14px; color: var(--pg-text); border-radius: 6px; }
.pg-account-page .bootstrap-table .fixed-table-toolbar .dropdown-item:hover { background: var(--pg-cream); }
.pg-account-page .bootstrap-table .fixed-table-container { overflow: hidden; background: #fff; border: 1px solid var(--pg-line) !important; border-radius: var(--pg-radius); }
.pg-account-page .bootstrap-table .fixed-table-body { overflow-x: auto; }
.pg-account-page .bootstrap-table .table { margin: 0; color: var(--pg-text); border: 0; }
.pg-account-page .bootstrap-table .table > :not(caption) > * { border-width: 0 !important; }
.pg-account-page .bootstrap-table .table > :not(:first-child) { border-top: 0 !important; }
.pg-account-page .bootstrap-table .table thead th { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--pg-muted); text-transform: uppercase; white-space: nowrap; vertical-align: middle; background: var(--pg-cream) !important; border: 0 !important; border-bottom: 1px solid var(--pg-line) !important; }
.pg-account-page .bootstrap-table .table thead th .th-inner { padding: 12px 14px !important; }
.pg-account-page .bootstrap-table .table thead th .sortable { padding-right: 28px !important; background-repeat: no-repeat; background-position: right 10px center; }
.pg-account-page .bootstrap-table .table thead th .sortable.both { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M5 1 1 5h8zM5 13 1 9h8z' fill='%23C9B9A6'/%3E%3C/svg%3E") !important; }
.pg-account-page .bootstrap-table .table thead th .sortable.asc { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M5 1 1 5h8z' fill='%235C3A21'/%3E%3Cpath d='M5 13 1 9h8z' fill='%23E2D6C6'/%3E%3C/svg%3E") !important; }
.pg-account-page .bootstrap-table .table thead th .sortable.desc { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='14' viewBox='0 0 10 14'%3E%3Cpath d='M5 1 1 5h8z' fill='%23E2D6C6'/%3E%3Cpath d='M5 13 1 9h8z' fill='%235C3A21'/%3E%3C/svg%3E") !important; }
.pg-account-page .bootstrap-table .table td { padding: 13px 14px; font-size: 14px; vertical-align: middle; background: transparent; border: 0 !important; border-bottom: 1px solid var(--pg-line) !important; }
.pg-account-page .bootstrap-table .table tbody tr:last-child td { border-bottom: 0 !important; }
.pg-account-page .bootstrap-table .table-hover tbody tr:hover { background: #FFFCF7; }
.pg-account-page .bootstrap-table .table .no-records-found td { padding: 44px 16px; font-size: 15px; text-align: center; color: var(--pg-muted); }
.pg-account-page .bootstrap-table .fixed-table-loading { color: var(--pg-muted); background: rgba(255, 255, 255, .85); }
.pg-account-page .pg-acc-notify-list .table th[data-field="id"] { width: 110px; }
.pg-account-page .bootstrap-table .badge { display: inline-flex; align-items: center; padding: 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: capitalize; border-radius: 999px; }
.pg-account-page .bootstrap-table .badge.bg-success-lt, .pg-account-page .badge.badge-success, .pg-acc-modal .badge.badge-success { color: var(--pg-success) !important; background: var(--pg-success-soft) !important; }
.pg-account-page .bootstrap-table .badge.bg-info-lt, .pg-account-page .bootstrap-table .badge.bg-primary-lt, .pg-account-page .badge.badge-info, .pg-acc-modal .badge.badge-info { color: var(--pg-mocha) !important; background: var(--pg-gold-soft) !important; }
.pg-account-page .bootstrap-table .badge.bg-warning-lt, .pg-account-page .badge.badge-warning, .pg-acc-modal .badge.badge-warning { color: #7A5A00 !important; background: #FBF0CC !important; }
.pg-account-page .bootstrap-table .badge.bg-danger-lt, .pg-account-page .badge.badge-danger, .pg-acc-modal .badge.badge-danger { color: var(--pg-danger) !important; background: var(--pg-danger-soft) !important; }
.pg-account-page .bootstrap-table .badge.bg-secondary-lt, .pg-account-page .badge.badge-secondary, .pg-acc-modal .badge.badge-secondary { color: var(--pg-muted) !important; background: #F1ECE5 !important; }
.pg-account-page .fixed-table-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.pg-account-page .fixed-table-pagination::after { display: none; }
.pg-account-page .fixed-table-pagination .pagination-detail, .pg-account-page .fixed-table-pagination > .pagination { float: none !important; margin: 0 !important; }
.pg-account-page .fixed-table-pagination .pagination-info { font-size: 13px; color: var(--pg-muted); }
.pg-account-page .fixed-table-pagination .page-list .btn { height: 34px; color: var(--pg-mocha) !important; background: #fff !important; border: 1px solid #DCCFBD !important; border-radius: var(--pg-radius-sm) !important; box-shadow: none !important; }
.pg-account-page .fixed-table-pagination ul.pagination { gap: 6px; margin: 0; }
.pg-account-page .fixed-table-pagination .page-link { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; font-weight: 600; color: var(--pg-mocha); background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius-sm) !important; box-shadow: none; }
.pg-account-page .fixed-table-pagination .page-item.active .page-link { color: #fff; background: var(--pg-mocha); border-color: var(--pg-mocha); }
.pg-account-page .fixed-table-pagination .page-item.disabled .page-link { color: #BFB2A3; }
/* phones: account.js switches the lists to bootstrap-table card view */
.pg-account-page .bootstrap-table .card-views { display: flex; flex-direction: column; gap: 6px; }
.pg-account-page .bootstrap-table .card-view { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 14px; }
.pg-account-page .bootstrap-table .card-view-title { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--pg-muted); }
.pg-account-page .bootstrap-table .card-view-title > *, .pg-account-page .bootstrap-table .card-view-value > * { font-size: inherit; }
.pg-account-page .bootstrap-table .card-view-value { min-width: 0; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
    .pg-account-page .pg-acc-table-panel { padding: 14px; }
    .pg-account-page .bootstrap-table .fixed-table-toolbar .search { flex: 1 1 100%; max-width: none; }
    .pg-account-page .bootstrap-table .table td { padding: 14px; }
    .pg-account-page .fixed-table-pagination { justify-content: center; }
}

/* ======================================================================
   wishlist (favorites.php, tiles from pages/pg-product-card.php)
   ====================================================================== */
.pg-account-page .pg-fav-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pg-account-page .pg-fav-item { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pg-account-page .pg-fav-item .pg-card { flex: 1 1 auto; height: auto; }
.pg-account-page .pg-fav-item > .pg-btn { flex: 0 0 auto; }
/* "removed" note floats on the tile (account.js sets .is-removed when custom.js switches the heart off) */
.pg-account-page .pg-fav-removed { position: absolute; top: 10px; right: 52px; left: 10px; z-index: 3; display: none; align-items: center; gap: 6px; padding: 6px 10px; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--pg-text); background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius-sm); box-shadow: var(--pg-shadow); }
.pg-account-page .pg-fav-removed i { color: var(--pg-mocha); }
.pg-account-page .pg-fav-item.is-removed .pg-card-link, .pg-account-page .pg-fav-item.is-removed > .pg-btn { opacity: .45; }
.pg-account-page .pg-fav-item.is-removed .pg-fav-removed { display: flex; }
@media (max-width: 1199.98px) {
    .pg-account-page .pg-fav-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .pg-account-page .pg-fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .pg-account-page .pg-fav-item > .pg-btn { min-height: 38px; padding: 0 8px; font-size: 13px; }
}

/* ======================================================================
   support tickets (tickets.php): list actions + conversation modal
   ====================================================================== */
.pg-account-page .bootstrap-table td .dropdown > .btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; color: var(--pg-mocha) !important; background: #fff !important; border: 1px solid #DCCFBD !important; border-radius: 50% !important; box-shadow: none !important; }
.pg-account-page .bootstrap-table td .dropdown > .btn:hover { background: var(--pg-gold-soft) !important; }
.pg-account-page .bootstrap-table td .dropdown > .btn i.ti::before { content: "\22EE"; font-family: inherit; font-size: 18px; font-style: normal; font-weight: 700; line-height: 1; }
.pg-account-page .bootstrap-table td .dropdown-menu { min-width: 170px; padding: 6px; border: 1px solid var(--pg-line); border-radius: 10px; box-shadow: var(--pg-shadow); }
.pg-account-page .bootstrap-table td .dropdown-item { display: flex; align-items: center; gap: 4px; padding: 8px 10px; font-size: 14px; color: var(--pg-text); border-radius: 6px; }
.pg-account-page .bootstrap-table td .dropdown-item i { color: var(--pg-mocha); }
.pg-account-page .bootstrap-table td .dropdown-item:hover { color: var(--pg-mocha); background: var(--pg-cream); }
.pg-account-page .bootstrap-table td .dropdown-item.disabled { color: #B5A898; pointer-events: none; }
.pg-account-page .bootstrap-table td .dropdown-item.disabled i { color: inherit; }
.pg-account-page .bootstrap-table td .font-weight-bold { font-weight: 700; color: var(--pg-espresso); }
.pg-acc-modal .pg-ticket-types-note { margin-top: 10px; font-size: 13px; }

.pg-ticket-chat .direct-chat { margin: 0; background: transparent; border: 0; box-shadow: none; }
.pg-ticket-chat .direct-chat .card-header { padding: 12px 14px; background: var(--pg-cream); border: 1px solid var(--pg-line); border-radius: 10px; }
.pg-ticket-chat .pg-tc-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; }
.pg-ticket-chat .pg-tc-row + .pg-tc-row { margin-top: 6px; }
.pg-ticket-chat #ticket_type_chat { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--pg-mocha); text-transform: uppercase; }
.pg-ticket-chat #subject_chat { font-size: 16px; font-weight: 700; color: var(--pg-espresso); }
.pg-ticket-chat #date_created { font-size: 12px; color: var(--pg-muted); }
.pg-ticket-chat .badge { padding: 4px 10px; font-size: 12px; font-weight: 700; border-radius: 999px; }
.pg-ticket-chat .direct-chat .card-body { padding: 12px 0 0; }
.pg-ticket-chat .direct-chat-messages { height: 340px; max-height: 50vh; padding: 12px; overflow-y: auto; background: #FFFCF7; border: 1px solid var(--pg-line); border-radius: 10px; }
.pg-ticket-chat .direct-chat-msg { display: flex; flex-direction: column; align-items: flex-start; margin: 0 0 12px; }
.pg-ticket-chat .direct-chat-msg.right { align-items: flex-end; }
.pg-ticket-chat .direct-chat-infos { display: flex; gap: 8px; margin-bottom: 4px; font-size: 12px; color: var(--pg-muted); }
.pg-ticket-chat .direct-chat-infos span { float: none !important; }
.pg-ticket-chat .direct-chat-name { font-weight: 700; color: var(--pg-text); }
.pg-ticket-chat .direct-chat-text { position: relative; max-width: 82%; margin: 0; padding: 10px 14px; font-size: 14px; color: var(--pg-text); background: #fff; border: 1px solid var(--pg-line); border-radius: 14px 14px 14px 4px; overflow-wrap: anywhere; }
.pg-ticket-chat .direct-chat-text::before, .pg-ticket-chat .direct-chat-text::after { display: none; }
.pg-ticket-chat .direct-chat-msg.right .direct-chat-text { color: #fff; background: var(--pg-mocha); border-color: var(--pg-mocha); border-radius: 14px 14px 4px 14px; }
.pg-ticket-chat .direct-chat-text .btn { margin-top: 6px; }
.pg-ticket-chat #chat-box-content { display: none; }
.pg-ticket-chat .direct-chat .card-footer { padding: 12px 0 0; background: transparent; border: 0; }
.pg-ticket-chat .pg-tc-compose { display: flex; align-items: center; gap: 8px; }
.pg-ticket-chat .pg-tc-compose .image-upload-section { flex: 0 1 auto; width: auto; margin: 0; padding: 0; }
.pg-ticket-chat .pg-tc-compose .image-upload-section:not(:has(*)) { display: none; }
.pg-ticket-chat .pg-tc-attach { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 46px; height: 46px; margin: 0; font-size: 18px; color: var(--pg-mocha); cursor: pointer; background: #fff; border: 1px solid #DCCFBD; border-radius: var(--pg-radius-sm); }
.pg-ticket-chat .pg-tc-attach:hover { background: var(--pg-gold-soft); }
.pg-ticket-chat .pg-tc-compose .form-control { flex: 1 1 auto; min-width: 0; height: 46px; font-size: 15px; border: 1px solid #DCCFBD; border-radius: var(--pg-radius-sm); }
.pg-ticket-chat .pg-tc-compose .form-control:focus { border-color: var(--pg-gold); box-shadow: 0 0 0 3px rgba(212, 160, 23, .22); }
.pg-ticket-chat .pg-tc-compose .pg-btn { flex: 0 0 auto; }
@media (max-width: 767.98px) {
    .pg-ticket-chat .direct-chat-messages { height: 300px; }
}

/* ======================================================================
   refer and earn (refer-and-earn.php)
   ====================================================================== */
.pg-account-page .pg-refer-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 24px; color: var(--pg-cream); text-align: center; background: radial-gradient(circle at 15% 0%, rgba(212, 160, 23, .3), transparent 45%), linear-gradient(135deg, var(--pg-espresso) 0%, var(--pg-mocha) 100%); border-radius: var(--pg-radius); }
.pg-account-page .pg-refer-icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; font-size: 36px; color: var(--pg-espresso); background: var(--pg-gold); border-radius: 50%; box-shadow: 0 0 0 8px rgba(212, 160, 23, .18); }
.pg-account-page .pg-refer-title { margin: 6px 0 0; font-size: 24px; font-weight: 800; color: #fff; }
.pg-account-page .pg-refer-text { max-width: 520px; margin: 0; font-size: 15px; line-height: 1.6; color: rgba(255, 249, 240, .85); }
.pg-account-page .pg-refer-code-box { width: min(100%, 400px); margin-top: 6px; padding: 14px 16px; text-align: left; background: rgba(255, 249, 240, .08); border: 1.5px dashed var(--pg-gold); border-radius: 12px; }
.pg-account-page .pg-refer-code-label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--pg-gold-light); text-transform: uppercase; }
.pg-account-page .pg-refer-code-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pg-account-page .pg-refer-code { min-width: 0; overflow: hidden; font-size: 26px; font-weight: 800; letter-spacing: .12em; color: #fff; text-overflow: ellipsis; }
.pg-account-page .pg-refer-share { color: #fff !important; background: transparent; border-color: rgba(255, 249, 240, .65); }
.pg-account-page .pg-refer-share:hover, .pg-account-page .pg-refer-share:focus { color: var(--pg-espresso) !important; background: var(--pg-cream); border-color: var(--pg-cream); }
.pg-account-page .pg-refer-steps { margin-top: 16px; }
.pg-account-page .pg-refer-steps ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 14px 0 0; padding: 0; list-style: none; }
.pg-account-page .pg-refer-steps li { display: flex; align-items: flex-start; gap: 12px; }
.pg-account-page .pg-refer-step-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 42px; height: 42px; font-size: 20px; color: var(--pg-mocha); background: var(--pg-gold-soft); border-radius: 12px; }
.pg-account-page .pg-refer-steps strong { display: block; margin-bottom: 2px; font-size: 15px; color: var(--pg-espresso); }
.pg-account-page .pg-refer-steps p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--pg-muted); }
@media (max-width: 767.98px) {
    .pg-account-page .pg-refer-hero { padding: 24px 16px; }
    .pg-account-page .pg-refer-title { font-size: 20px; }
    .pg-account-page .pg-refer-code { font-size: 22px; }
    .pg-account-page .pg-refer-share { width: 100%; }
    .pg-account-page .pg-refer-steps ol { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- chat (my-account/chat) ----------
   The widget brings its own look from css/components.css (stisla): cold blue-grey and sized for the
   admin panel. Everything below re-dresses it inside .pg-acc-chat; the markup and its JS are untouched. */
.pg-acc-chat .pg-chat { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.pg-acc-chat .pg-chat-side { display: flex; flex-direction: column; min-width: 0; background: #fff; border-right: 1px solid var(--pg-line); }
.pg-acc-chat .pg-chat-search { padding: 14px 14px 10px; border-bottom: 1px solid var(--pg-line); }
.pg-acc-chat .pg-chat-scroll { flex: 1 1 auto; min-height: 320px; max-height: 560px; padding-bottom: 10px; overflow-y: auto; }
.pg-acc-chat .pg-chat-group { margin: 14px 0 4px; padding: 0 14px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--pg-muted); }
.pg-acc-chat .pg-chat-people { margin: 0; padding: 0; }
.pg-acc-chat .pg-chat-people .media, .pg-acc-chat .pg-chat-people .media-body { margin: 0; padding: 0; border: 0; }
.pg-acc-chat .pg-chat-none { padding: 6px 14px 10px; font-size: 13px; color: var(--pg-muted); }
.pg-acc-chat .pg-chat-person { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; font-size: 14px; color: var(--pg-text); cursor: pointer; border-left: 3px solid transparent; }
.pg-acc-chat .pg-chat-person:hover { background: var(--pg-cream); }
.pg-acc-chat .pg-chat-person.active { font-weight: 600; background: var(--pg-cream); border-left-color: var(--pg-gold); }
.pg-acc-chat .pg-chat-person.new-msg-rcv { font-weight: 700; }
.pg-acc-chat .pg-chat-avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; font-size: 14px; font-weight: 700; color: var(--pg-cream); background: var(--pg-mocha); border-radius: 50%; }
.pg-acc-chat .pg-chat-avatar.is-support { color: var(--pg-espresso); background: var(--pg-gold); }
.pg-acc-chat .pg-chat-avatar i { font-size: 17px; }
.pg-acc-chat .pg-chat-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-acc-chat .pg-chat-dot { flex: 0 0 auto; font-size: 8px; color: var(--pg-line); }
.pg-acc-chat .pg-chat-dot.is-online, .pg-acc-chat .pg-chat-dot.text-success { color: var(--pg-success) !important; }
.pg-acc-chat .badge-chat { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; color: #fff; background: var(--pg-danger); border-radius: 10px; }

/* right column */
.pg-acc-chat .pg-chat-main { display: flex; flex-direction: column; min-width: 0; background: var(--pg-bg); }
.pg-acc-chat .pg-chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1 1 auto; min-height: 420px; padding: 30px 20px; text-align: center; }
.pg-acc-chat .pg-chat-empty-title { margin: 14px 0 4px; font-size: 17px; font-weight: 700; color: var(--pg-text); }
.pg-acc-chat .pg-chat-empty-text { margin: 0; max-width: 320px; font-size: 14px; color: var(--pg-muted); }
.pg-acc-chat .pg-chat-thread { flex: 1 1 auto; min-width: 0; }
.pg-acc-chat .chat-box.card, .pg-acc-chat .card.chat-min { display: flex; flex-direction: column; height: 100%; min-height: 480px; margin: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }

.pg-acc-chat .pg-chat-head { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--pg-line); }
.pg-acc-chat .pg-chat-back { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -8px; padding: 0; font-size: 22px; color: var(--pg-mocha); background: none; border: 0; }
.pg-acc-chat .pg-chat-head-avatar { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 40px; height: 40px; overflow: hidden; font-size: 16px; font-weight: 700; color: var(--pg-cream); background: var(--pg-mocha); border-radius: 50%; }
.pg-acc-chat .pg-chat-head-avatar img, .pg-acc-chat .pg-chat-head-avatar figure { width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 50%; }
.pg-acc-chat .pg-chat-head-who { min-width: 0; }
.pg-acc-chat .pg-chat-head-name { font-size: 15px; font-weight: 700; color: var(--pg-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-acc-chat .pg-chat-head-status { font-size: 12px; color: var(--pg-muted); }

/* messages. The bubble markup comes from $.chatCtrl in js/stisla.js. */
.pg-acc-chat .pg-chat-content { flex: 1 1 auto; min-height: 300px; max-height: 480px; padding: 18px 16px; overflow-y: auto; background: var(--pg-bg); }
.pg-acc-chat .chat_loader { padding: 6px 0; font-size: 12px; text-align: center; color: var(--pg-muted); }
.pg-acc-chat .chat_divider { width: fit-content; margin: 12px auto; padding: 4px 12px; font-size: 11px; font-weight: 600; color: var(--pg-mocha); background: var(--pg-gold-soft); border-radius: 999px; }
.pg-acc-chat .chat-item { display: flex; align-items: flex-end; gap: 8px; margin: 0 0 12px; }
.pg-acc-chat .chat-item .chat-avtar { flex: 0 0 auto; }
.pg-acc-chat .chat-item .chat-avtar figure, .pg-acc-chat .chat-item .chat-avtar img { width: 28px; height: 28px; margin: 0; object-fit: cover; border-radius: 50%; }
.pg-acc-chat .chat-item .chat-details { min-width: 0; max-width: min(78%, 460px); }
.pg-acc-chat .chat-item .chat-text { padding: 9px 13px; font-size: 14px; line-height: 1.5; color: var(--pg-text); background: #fff; border: 1px solid var(--pg-line); border-radius: 12px 12px 12px 3px; overflow-wrap: anywhere; }
.pg-acc-chat .chat-item .chat-time { margin-top: 3px; font-size: 11px; color: var(--pg-muted); }
.pg-acc-chat .chat-item.chat-right { flex-direction: row-reverse; }
.pg-acc-chat .chat-item.chat-right .chat-text { color: var(--pg-espresso); background: var(--pg-gold-soft); border-color: var(--pg-gold-light); border-radius: 12px 12px 3px 12px; }
.pg-acc-chat .chat-item.chat-right .chat-time { text-align: right; }
.pg-acc-chat .chat-item .chat-image-view img, .pg-acc-chat .chat-item .msg_text_media img { max-width: 100%; height: auto; border-radius: 8px; }

/* composer */
.pg-acc-chat .pg-chat-form { position: relative; flex: 0 0 auto; padding: 12px 16px; background: #fff; border-top: 1px solid var(--pg-line); }
.pg-acc-chat .pg-chat-compose { display: flex; align-items: flex-end; gap: 8px; }
.pg-acc-chat textarea.pg-chat-input { flex: 1 1 auto; min-height: 44px; max-height: 120px; padding: 11px 14px; font-size: 14px; line-height: 1.4; color: var(--pg-text); background: var(--pg-bg); border: 1px solid var(--pg-line); border-radius: 22px; resize: none; }
.pg-acc-chat textarea.pg-chat-input:focus { background: #fff; border-color: var(--pg-gold); outline: 0; box-shadow: none; }
.pg-acc-chat .pg-chat-attach, .pg-acc-chat .pg-chat-send { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; font-size: 18px; cursor: pointer; border: 1px solid transparent; border-radius: 50%; }
.pg-acc-chat .pg-chat-attach { color: var(--pg-mocha); background: var(--pg-cream); border-color: var(--pg-line); }
.pg-acc-chat .pg-chat-attach:hover { color: var(--pg-espresso); background: var(--pg-gold-soft); }
.pg-acc-chat .pg-chat-send { color: #fff; background: var(--pg-mocha); }
.pg-acc-chat .pg-chat-send:hover { background: var(--pg-espresso); }
.pg-acc-chat .pg-chat-down { position: absolute; right: 70px; bottom: 68px; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; color: var(--pg-mocha); background: #fff; border: 1px solid var(--pg-line); border-radius: 50%; box-shadow: var(--pg-shadow); cursor: pointer; }
.pg-acc-chat .pg-chat-drop { padding: 14px 16px; background: #fff; border-top: 1px solid var(--pg-line); }
.pg-acc-chat .pg-chat-drop .dropzone { min-height: 120px; background: var(--pg-bg); border: 2px dashed var(--pg-line); border-radius: var(--pg-radius-sm); }

/* select2 box for starting a new chat */
/* the original <select> keeps bootstrap .w-100, whose width:100%!important beats select2 own
   width:1px!important, so the hidden element stretched the page ~380px to the right. */
.pg-acc-chat select.select2-hidden-accessible { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.pg-acc-chat .select2-container { width: 100% !important; }
.pg-acc-chat .select2-container--default .select2-selection--multiple { min-height: 42px; padding: 3px 6px; background: var(--pg-bg); border: 1px solid var(--pg-line); border-radius: var(--pg-radius-sm); }
.pg-acc-chat .select2-container--default.select2-container--focus .select2-selection--multiple { border-color: var(--pg-gold); }

/* search-in-chat modal */
.pg-chat-modal .modal-content { border: 0; border-top: 4px solid var(--pg-gold); border-radius: var(--pg-radius); }
.pg-chat-modal .modal-header { align-items: center; border-bottom: 1px solid var(--pg-line); }
.pg-chat-modal .input-group-text { color: var(--pg-mocha); background: var(--pg-cream); border-color: var(--pg-line); }
.pg-chat-modal .pg-chat-results { margin-top: 14px; }

/* The widget's own rules in css/components.css are written for the admin panel and are specific
   (.chat-box .chat-content .chat-item ... = 5 classes) and in places !important, so these match
   their shape before adding .pg-acc-chat on top. */
.pg-acc-chat .chat-box .chat-content .chat-item { display: flex; align-items: flex-end; gap: 8px; width: auto; margin: 0 0 12px; }
.pg-acc-chat .chat-box .chat-content .chat-item.chat-right { flex-direction: row-reverse; }
.pg-acc-chat .chat-box .chat-content .chat-item .chat-avtar { flex: 0 0 auto; }
.pg-acc-chat .chat-box .chat-content .chat-item .chat-avtar figure,
.pg-acc-chat .chat-box .chat-content .chat-item .chat-avtar img { float: none; width: 28px; height: 28px; margin: 0; object-fit: cover; border-radius: 50%; }
.pg-acc-chat .chat-box .chat-content .chat-item .chat-details { min-width: 0; max-width: min(78%, 460px); margin: 0; text-align: left; }
.pg-acc-chat .chat-box .chat-content .chat-item.chat-right .chat-details { margin: 0; text-align: right; }
.pg-acc-chat .chat-box .chat-content .chat-item .chat-details .chat-text { display: inline-block; padding: 9px 13px; font-size: 14px; line-height: 1.5; text-align: left; color: var(--pg-text); background-color: #fff; border: 1px solid var(--pg-line); border-radius: 12px 12px 12px 3px; box-shadow: none; overflow-wrap: anywhere; }
.pg-acc-chat .chat-box .chat-content .chat-item.chat-right .chat-details .chat-text { color: var(--pg-espresso); background-color: var(--pg-gold-soft); border-color: var(--pg-gold-light); border-radius: 12px 12px 3px 12px; }
.pg-acc-chat .chat-box .chat-content .chat-item .chat-details .chat-time { margin-top: 3px; font-size: 11px; font-weight: 500; opacity: 1; color: var(--pg-muted); }
.pg-acc-chat .chat-box .chat-content .chat-item .chat-details .chat-text img { max-width: 100%; margin-bottom: 8px; border-radius: 8px; }

/* composer: the stock rules pin the buttons absolutely inside a 50px input */
.pg-acc-chat .chat-box .chat-form .form-control { height: auto; padding: 11px 14px; border: 1px solid var(--pg-line); border-radius: 22px; font-size: 14px; }
.pg-acc-chat .chat-box .chat-form .btn,
.pg-acc-chat .chat-box .chat-form .btn-file,
.pg-acc-chat .chat-box .chat-form .btn-send-msg { position: static; width: 44px; height: 44px; margin: 0; transform: none; box-shadow: none; }
.pg-acc-chat .chat-box .chat-form .btn-arrow { position: absolute !important; top: auto !important; right: 26px !important; bottom: 72px !important; width: 38px !important; height: 38px !important; transform: none; }
.pg-acc-chat .select2-search__field { width: 100% !important; }

@media (max-width: 991px) {
    .pg-acc-chat .pg-chat { grid-template-columns: minmax(0, 1fr); }
    .pg-acc-chat .pg-chat-side { border-right: 0; border-bottom: 1px solid var(--pg-line); }
    .pg-acc-chat .pg-chat-scroll { min-height: 0; max-height: 260px; }
    .pg-acc-chat .pg-chat-empty { min-height: 260px; }
    .pg-acc-chat .pg-chat-content { min-height: 340px; max-height: none; }
    /* one pane at a time: .is-thread is set by initChat() in js/pg-pages/account.js */
    .pg-acc-chat .pg-chat.is-thread .pg-chat-side { display: none; }
    .pg-acc-chat .pg-chat-back { display: flex; }
}

/* the same widget inside the floating bubble's 450x600 iframe (pages/floating_chat.php).
   The body carries .pg-acc-chat too, so everything above applies; this is the panel trim. */
.pg-fchat { margin: 0; background: #fff; }
.pg-fchat .chat-section, .pg-fchat .main-content { display: flex; flex-direction: column; height: 100vh; }
.pg-fchat .pg-fchat-bar { flex: 0 0 auto; padding: 14px 16px; background: var(--pg-espresso); border-bottom: 2px solid var(--pg-gold); }
.pg-fchat .pg-fchat-bar h1 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 700; color: var(--pg-cream); }
.pg-fchat .pg-fchat-bar h1 i { font-size: 20px; color: var(--pg-gold); }
.pg-fchat #floating_chat_view { display: block; flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; }
.pg-fchat .pg-chat-side, .pg-fchat .pg-chat-main { height: 100%; border: 0; }
.pg-fchat .pg-chat-scroll { min-height: 0; max-height: none; }
.pg-fchat .pg-chat-content { min-height: 0; max-height: none; }
.pg-fchat .chat-box.card, .pg-fchat .card.chat-min { height: 100% !important; min-height: 0; max-height: none; }
.pg-fchat .pg-chat-back { display: flex; }
.pg-fchat .pg-chat-form { padding: 10px 12px; }
.pg-fchat .pg-chat-down { right: 64px; bottom: 64px; }

/* ---------- tap targets on phones ----------
   The order-card links were ~21px tall and the avatar edit button 36px. */
@media (max-width: 991.98px) {
    .pg-account-page .pg-acc-nav .pg-acc-user-edit { width: 44px; height: 44px; }
    .pg-account-page .pg-link, .pg-account-page .pg-line-actions a, .pg-account-page .pg-line-actions button { display: inline-flex; align-items: center; min-height: 44px; }
    .pg-acc-chat .pg-chat-person { min-height: 56px; }
    .pg-account-page .pg-line-name a { display: inline-block; padding-top: 11px; padding-bottom: 11px; margin-top: -11px; margin-bottom: -11px; }
    .pg-account-page .pg-btn-sm { min-height: 40px; }
}

/* what came of a return, shown under the item on the order page (docs/RETURN-DISPUTE.md) */
.pg-return-outcome {
    margin: 12px 0 4px;
    padding: 10px 12px;
    border-left: 3px solid var(--pg-gold, #D4A017);
    border-radius: 6px;
    background: var(--pg-cream, #FFF9F0);
}
.pg-return-outcome.is-refused { border-left-color: #c0392b; }
.pg-return-outcome-title {
    font-size: 14px;
    color: var(--pg-mocha, #5C3A21);
}
.pg-return-outcome-text {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b5847;
}