/* Order-history presentation only. Keep filters, roles and actions intact. */
@media screen {
  #view-order-history {
    --oh-ink: #1d1d1f;
    --oh-muted: #6e6e73;
    --oh-line: #e8e8ed;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }
  #view-order-history .page-inner { max-width: none; }
  #view-order-history .order-history-card {
    background: #fff;
    box-shadow: none;
    border-color: var(--oh-line);
  }
  #view-order-history .order-history-header {
    padding: 20px 20px 16px;
  }
  #view-order-history .order-history-header .cart-heading {
    font: 650 26px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -.7px;
    color: var(--oh-ink);
  }
  #view-order-history .order-history-actions { gap: 6px; }
  #view-order-history :is(.order-history-back-btn, .rn-menu-toggle) {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    color: var(--oh-muted);
  }
  #view-order-history :is(.order-history-back-btn, .rn-menu-toggle):hover {
    background: #f5f5f7;
    color: var(--oh-ink);
    box-shadow: none;
  }
  #view-order-history .order-history-table-wrap { margin-top: 0; }
  #view-order-history .order-history-table {
    color: var(--oh-ink);
    font-size: 13px;
    line-height: 1.35;
  }
  #view-order-history .order-history-table td { border-color: var(--oh-line); }
  #view-order-history .order-history-table .order-history-status-pill {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    gap: 4px;
    padding: 4px 6px;
    vertical-align: middle;
  }
  #view-order-history .order-history-table .order-history-status-pill::before { flex: 0 0 8px; }
  #view-order-history .order-history-status-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #view-order-history tr.order-history-row:not(.is-selected):not(.is-address-missing):not(.is-address-invalid):hover {
    background: #f9f9fb;
    box-shadow: none;
  }
  #view-order-history .order-history-creator-stack { gap: 1px; }
  #view-order-history .oh-creator-name {
    order: 0;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
    color: var(--oh-ink);
  }
  #view-order-history .oh-creator-pill {
    color: var(--oh-muted);
    font-size: 11px;
    font-weight: 400;
    font-style: normal;
  }
  #view-order-history .order-history-thumbs {
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 4px;
  }
  #view-order-history .order-history-thumb {
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 8px;
    border-color: var(--oh-line);
    object-fit: contain;
    background: #fff;
  }
  #view-order-history .order-history-thumb.more {
    background: #f5f5f7;
    border-color: transparent;
    color: var(--oh-muted);
    font-size: 11px;
    font-weight: 500;
  }
  #view-order-history .order-history-note {
    color: var(--oh-muted);
    font-weight: 400;
  }
  #view-order-history .order-history-linked-customer-icon,
  #view-order-history .order-history-phone-actions .rn-order-phone-action {
    color: var(--oh-muted);
  }
  #view-order-history .order-history-phone-actions .rn-ai-call-chip {
    background: transparent;
    color: var(--oh-muted);
    border-color: transparent;
    border-radius: 4px;
    padding: 0;
    height: auto;
    min-height: 20px;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: #c7c7cc;
    text-underline-offset: 3px;
  }
  #view-order-history .order-history-phone-actions .rn-ai-call-chip:hover { background: #f5f5f7; color: var(--oh-ink); }
  #view-order-history .order-history-total-values { font-variant-numeric: tabular-nums; }
}

@media screen and (min-width: 641px) {
  #view-order-history .order-history-header { grid-template-columns: 1fr auto 1fr; }
  #view-order-history .order-history-header .cart-heading {
    grid-column: 2;
    justify-self: center;
    text-align: center;
  }
  #view-order-history .order-history-actions { grid-column: 3; }
  #view-order-history .order-history-table { table-layout: fixed; min-width: 1180px; }
  #view-order-history .order-history-table th,
  #view-order-history .order-history-table td { box-sizing: border-box; padding: 10px 8px; }
  /* Fix widths from content needs, not the selected filter's text. */
  #view-order-history th.order-history-col-actions { width: 42px; }
  #view-order-history th.order-history-col-date { width: 106px; }
  /* RN#10000 (and six-digit IDs) must fit without entering the status column. */
  #view-order-history th.order-history-col-id { width: 96px; }
  #view-order-history th.order-history-col-status { width: 126px; }
  #view-order-history th.order-history-col-payment { width: 124px; }
  #view-order-history th.order-history-col-creator { width: 92px; }
  #view-order-history th.order-history-col-address { width: 132px; }
  #view-order-history th.order-history-col-content { width: 196px; }
  #view-order-history th.order-history-col-total { width: 138px; }
  #view-order-history .order-history-table thead {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f7f7f9;
  }
  #view-order-history .order-history-table thead th {
    position: static;
    background: #f7f7f9;
    color: var(--oh-muted);
    font-size: 11px;
    font-weight: 600;
    border-bottom: 0;
    padding-top: 10px;
    padding-bottom: 3px;
  }
  #view-order-history .order-history-table thead tr.order-history-filters-row th {
    position: static;
    padding: 4px 8px 10px;
    background: #f7f7f9;
    border-bottom: 1px solid var(--oh-line);
  }
  #view-order-history .oh-filter-preview {
    position: relative;
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-height: 30px;
    padding: 6px 24px 6px 9px;
    border-color: #dedee3;
    border-radius: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
  }
  #view-order-history .oh-filter-preview::after {
    position: absolute;
    right: 10px;
    top: calc(50% - 4px);
    width: 5px;
    height: 5px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
    opacity: .6;
  }
  #view-order-history .oh-filter-preview.is-active { box-shadow: none; }
  #view-order-history td.order-history-col-id { font-weight: 600 !important; }
  #view-order-history td.order-history-col-date { color: var(--oh-muted); font-size: 12px; }
  #view-order-history .order-history-date-stamp { display: inline-flex; gap: 4px; white-space: nowrap; }
  #view-order-history .order-history-time-part { font-size: inherit; }
  #view-order-history .order-history-buyer { display: block; max-width: none; }
  #view-order-history .order-history-buyer-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    gap: 2px;
    padding-right: 70px;
    min-height: 24px;
  }
  #view-order-history .order-history-buyer-main:not(:has(.order-history-phone-actions)):not(:has(.order-history-linked-customer-icon)) { padding-right: 0; }
  #view-order-history .order-history-buyer-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
    max-width: none;
    flex-basis: 100%;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  #view-order-history .order-history-phone-actions {
    display: flex;
    flex: 0 0 calc(100% + 70px);
    flex-wrap: wrap;
    margin: 0 -70px 0 0;
    min-width: 0;
  }
  #view-order-history .order-history-linked-customer-icon,
  #view-order-history .order-history-phone-actions .rn-order-phone-action {
    position: absolute;
    top: 0;
    width: 24px;
    height: 26px;
    margin: 0;
  }
  #view-order-history .order-history-linked-customer-icon { right: 48px; }
  #view-order-history .rn-order-phone-action[data-oh-phone-action="menu"] { right: 24px; }
  #view-order-history .rn-order-phone-action[data-oh-phone-action="sms"] { right: 0; }
  #view-order-history .order-history-col-address { font-size: 12px; overflow-wrap: anywhere; }
  #view-order-history .order-history-table :is(th, td):is(.order-history-col-content, .order-history-col-total) { text-align: right; }
  #view-order-history .order-history-table :is(th, td).order-history-col-total { white-space: nowrap; }
  #view-order-history .order-history-col-total .order-history-total-row { display: block; }
  #view-order-history :is(.order-history-col-content, .order-history-col-total) .oh-filter-preview { text-align: right; }
  #view-order-history[data-oh-role="customer"] .order-history-table { min-width: 900px; }
  /* Delivery workspaces add stop, schedule and driver columns dynamically. */
  body[data-rezim^="dostava"] #view-order-history .order-history-table { table-layout: auto; }
}

/* Only optional contact buttons fade. Unread-message and call notices stay visible. */
@media screen and (min-width: 641px) and (hover: hover) and (pointer: fine) {
  #view-order-history .order-history-row .order-history-linked-customer-icon,
  #view-order-history .order-history-row .order-history-phone-actions .rn-order-phone-action {
    opacity: 0;
    transition: opacity 120ms ease;
  }
  #view-order-history .order-history-row:is(:hover, :focus-within) .order-history-linked-customer-icon,
  #view-order-history .order-history-row:is(:hover, :focus-within) .order-history-phone-actions .rn-order-phone-action,
  #view-order-history .order-history-row .order-history-phone-actions .rn-order-phone-action.has-unread-sms {
    opacity: 1;
  }
}

@media screen and (max-width: 640px) {
  #view-order-history .order-history-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    padding: 12px 16px;
  }
  #view-order-history .order-history-header .cart-heading {
    justify-self: center;
    text-align: center;
    font-size: 23px;
  }
  #view-order-history .order-history-back-btn,
  #view-order-history .order-history-header .rn-menu-toggle,
  #view-order-history #order-history-new { width: 40px; height: 40px; border-radius: 10px; }
  #view-order-history .order-history-mobile-filters-title { margin: 6px 0 6px; padding-left: 16px; }
  #view-order-history .order-history-mobile-filters { margin: 0; padding: 0 16px 12px; gap: 8px; }
  #view-order-history .order-history-mobile-filters .filter-pill {
    min-height: 36px;
    padding: 7px 12px;
    border-color: #dedee3;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: #48484a;
    box-shadow: none;
  }
  #view-order-history .order-history-mobile-filters .filter-pill.filter-pill-active { background: #1d1d1f; border-color: #1d1d1f; color: #fff; }
  #view-order-history .order-history-mobile-filters .filter-pill-active .filter-pill-caret { border-top-color: currentColor; }
  #view-order-history .order-history-table tr.order-history-row {
    padding: 14px 16px;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--oh-line);
    border-radius: 0;
    box-shadow: none;
  }
  #view-order-history .order-history-table tr.order-history-row:last-child { border-bottom: 1px solid var(--oh-line); }
  #view-order-history td.order-history-col-actions { top: 9px; right: 10px; }
  #view-order-history .order-history-row-actions .rn-menu-toggle {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
  }
  #view-order-history td.order-history-col-select { top: 18px; right: 54px; }
  #view-order-history td.order-history-col-buyer { padding-right: 36px; }
  #view-order-history[data-oh-multi="true"] td.order-history-col-buyer { padding-right: 70px; }
  #view-order-history .order-history-buyer { display: block; max-width: none; }
  #view-order-history .order-history-buyer-main { flex-wrap: wrap; gap: 3px 7px; align-items: baseline; }
  #view-order-history .order-history-buyer-id { font-size: 12px; font-weight: 500; color: var(--oh-muted); }
  #view-order-history .order-history-buyer-sep { display: none; }
  #view-order-history .order-history-buyer-text {
    max-width: 100%;
    order: -1;
    flex-basis: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
  }
  #view-order-history .order-history-buyer-address {
    font-size: 12px;
    line-height: 1.4;
    color: var(--oh-muted);
    margin-top: 4px;
  }
  #view-order-history .order-history-buyer-status-mobile { margin-top: 0; }
  #view-order-history .order-history-buyer-inline-creator { font-size: 12px; font-weight: 400; color: var(--oh-muted); font-style: normal; }
  #view-order-history .order-history-note { margin-top: 6px; font-size: 12px; line-height: 1.4; }
  #view-order-history td.order-history-col-content { margin-top: 8px; }
  #view-order-history td.order-history-col-content:has(.order-history-thumbs:empty) { display: none; }
  #view-order-history td.order-history-col-total { margin-top: 8px; }
  #view-order-history .order-history-total-row { gap: 4px 8px; }
  #view-order-history .order-history-total-meta .order-history-buyer-date { font-size: 12px; color: var(--oh-muted); }
  #view-order-history .order-history-total-values { font-size: 15px; font-weight: 600; }
  #view-order-history .order-history-total-values .order-history-payment-mobile { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  #view-order-history .order-history-row .order-history-linked-customer-icon,
  #view-order-history .order-history-row .order-history-phone-actions .rn-order-phone-action { transition: none; }
}

/* Shared typography and the reviewed compact hierarchy. */
@media screen {
  #view-order-history .oh-name-line { display:flex; align-items:center; gap:7px; min-width:0; max-width:100%; }
  #view-order-history .oh-name-line .order-history-buyer-text { display:block; flex:0 1 auto; min-width:0; max-width:100%; font-weight:400; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; overflow-wrap:normal; }
  #view-order-history .oh-inline-contacts { display:inline-flex; align-items:center; flex:0 0 auto; gap:0; }
  #view-order-history .oh-inline-contacts .order-history-phone-actions { display:inline-flex; flex:0 0 auto; margin:0; gap:0; }
  #view-order-history .oh-inline-contacts :is(.order-history-linked-customer-icon,.rn-order-phone-action) { position:static; inset:auto; width:24px; height:20px; flex:0 0 24px; margin:0; display:inline-flex; align-items:center; justify-content:center; padding:2px; border:0; background:transparent; color:var(--oh-muted); }
  #view-order-history .oh-inline-contacts .order-history-phone-actions .rn-order-phone-action[data-oh-phone-loading="1"] { color:var(--oh-muted); }
  #view-order-history .oh-inline-contacts :is(.order-history-linked-customer-icon,.rn-order-phone-action):hover { color:var(--oh-ink); background:#f3f5f9; border-radius:5px; }
  #view-order-history .oh-creator-name { font-size:13px; line-height:1.35; font-weight:400; }
  #view-order-history .oh-creator-pill { font:400 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--oh-muted); background:none; border:0; padding:0; }
  #view-order-history .oh-row-annotations { display:flex; align-items:center; flex-wrap:nowrap; gap:10px; min-width:0; margin-top:0; }
  #view-order-history .oh-row-annotations :is(.order-history-note,.rn-ai-call-chip) { display:inline-flex; align-items:center; justify-content:flex-start; gap:4px; font:400 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--oh-muted); border:0; background:none; border-radius:0; padding:0; margin:0; min-height:18px; max-width:100%; box-shadow:none; text-decoration:none; }
  #view-order-history .oh-row-annotations [hidden] { display:none!important; }
  #view-order-history .oh-row-annotations .order-history-note { flex:0 1 auto; min-width:0; overflow:hidden; }
  #view-order-history .order-history-note-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #view-order-history .oh-row-annotations .rn-ai-call-chip { flex:0 0 auto; white-space:nowrap; cursor:pointer; }
  #view-order-history .oh-row-annotations :is(.order-history-note-icon,svg) { width:14px; height:14px; flex:0 0 14px; color:#8e8e93; }
  #view-order-history .oh-row-annotations .rn-ai-call-chip:hover { color:#007aff; }
  #view-order-history .oh-name-line .rn-ai-call-chip { display:inline-flex; align-items:center; flex:0 0 auto; gap:4px; margin:0; padding:0; border:0; background:none; box-shadow:none; color:var(--oh-muted); font:400 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; white-space:nowrap; }
  #view-order-history .oh-name-line .rn-ai-call-chip svg { width:14px; height:14px; }
  #view-order-history .oh-name-line .rn-ai-call-chip:hover { color:#007aff; }
  #view-order-history .oh-name-line .order-history-note { display:inline-flex; align-items:center; flex:0 1 auto; gap:4px; min-width:0; max-width:50%; margin:0; padding:0; color:var(--oh-muted); font:400 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
  #view-order-history .oh-name-line .order-history-note-icon { display:inline-flex; flex:0 0 14px; }
  #view-order-history .oh-name-line .order-history-note-icon svg { width:14px; height:14px; }
  #view-order-history .oh-name-line:has(.order-history-note.is-expanded) { flex-wrap:wrap; }
  #view-order-history .oh-name-line .order-history-note.is-expanded { flex-basis:100%; max-width:100%; }
  #view-order-history .order-history-note { position:relative; }
  #view-order-history .oh-mobile-note, #view-order-history .oh-mobile-creator { display:none; }
  #view-order-history .oh-note-cta { display:none; flex:0 0 auto; padding:0; background:none; color:inherit; font:inherit; white-space:nowrap; }
  #view-order-history .order-history-payment-link { font:400 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--oh-muted)!important; border:1px solid transparent; background:none; border-radius:6px; padding:3px 4px; margin-left:-5px; box-shadow:none; display:inline-block; white-space:normal; text-align:left; max-width:100%; box-sizing:border-box; height:auto; min-height:0; vertical-align:top; }
  #view-order-history .order-history-payment-link:hover { text-decoration:none; background:#f5f5f7; border-color:#dedee3; }
  #view-order-history .order-history-payment-link .order-history-payment-receipt-note { display:inline-block; vertical-align:baseline; white-space:nowrap; font:inherit; color:inherit; background:none; border:0; padding:0; }
  #view-order-history .order-history-payment-link .order-history-payment-receipt-note::before { content:none; }
  #view-order-history .order-history-payment-link[data-oh-receipt-only] .order-history-payment-receipt-note::before { content:none; }
  /* Clipping an inline block moves its baseline to its bottom edge. */
  #view-order-history .order-history-payment-link .order-history-payment-main { display:inline-block; overflow:visible; vertical-align:baseline; white-space:nowrap; font:inherit; }
  #view-order-history .order-history-payment-link [hidden] { display:none!important; }
  #view-order-history .order-history-payment-link .order-history-payment-receipt-note svg { display:none; }
}
@media screen and (min-width:641px) {
  #view-order-history .order-history-table { min-width:1380px; }
  #view-order-history th.order-history-col-date { width:126px; }
  #view-order-history th.order-history-col-status { width:116px; }
  #view-order-history th.order-history-col-payment { width:124px; }
  #view-order-history th.order-history-col-creator { width:100px; }
  #view-order-history th.order-history-col-total { width:136px; }
  #view-order-history th.order-history-col-buyer { width:23%; }
  #view-order-history th.order-history-col-address { width:174px; }
  #view-order-history .order-history-thumb--mobile-extra { display:none; }
  #view-order-history .order-history-buyer-main { display:block; padding-right:0; min-height:0; }
  #view-order-history .oh-row-context { margin-top:1px; }
  #view-order-history .order-history-col-address { font-size:12px; line-height:1.5; overflow-wrap:normal; }
  #view-order-history .order-history-payment-mobile { display:none; }
}
@media screen and (max-width:640px) {
  #view-order-history .order-history-table tr.order-history-row { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; padding:12px 16px; position:relative; }
  #view-order-history .order-history-buyer-main { display:block; }
  #view-order-history td.order-history-col-buyer { grid-column:1/-1; grid-row:1; margin:0; padding:0; }
  #view-order-history .oh-name-line { padding-right:34px; align-items:baseline; gap:8px; }
  #view-order-history[data-oh-multi="true"] .oh-name-line { padding-right:70px; }
  #view-order-history .oh-name-line .order-history-buyer-text { order:0; flex:0 1 auto; font-size:15px; }
  #view-order-history .oh-name-line .order-history-buyer-id { flex:0 0 auto; font-size:11px; font-weight:400; letter-spacing:0; white-space:nowrap; }
  #view-order-history .oh-inline-contacts { display:none; }
  #view-order-history .oh-row-context { display:flex; align-items:center; gap:2px 10px; flex-wrap:wrap; margin-top:4px; min-width:0; }
  #view-order-history .oh-row-context .order-history-buyer-status-mobile { margin:0; display:block; flex:0 0 auto; }
  #view-order-history .oh-row-context .order-history-buyer-address { display:inline-flex; flex:0 1 auto; max-width:100%; align-items:center; gap:4px; margin:0; font-size:12px; line-height:1.4; }
  #view-order-history .order-history-buyer-address .order-history-address-text { max-width:100%; white-space:normal; }
  #view-order-history .oh-row-context .order-history-buyer-inline-creator { font-size:12px; }
  #view-order-history .order-history-buyer-inline-sep { display:none; }
  #view-order-history .oh-row-annotations { margin:0; flex:0 1 auto; }
  #view-order-history .oh-row-annotations .order-history-note-text { max-width:150px; }
  #view-order-history td.order-history-col-content { grid-column:1; grid-row:2; margin:0; padding:0; min-width:0; }
  #view-order-history .order-history-thumbs { gap:4px; width:100%; max-width:100%; overflow-x:auto; scrollbar-width:none; }
  #view-order-history .order-history-thumbs::-webkit-scrollbar { display:none; }
  #view-order-history .order-history-thumbs .more { display:none; }
  #view-order-history .order-history-thumb { width:32px; height:32px; flex-basis:32px; }
  #view-order-history td.order-history-col-total { grid-column:1; grid-row:3; margin:0; padding:0; min-width:0; }
  #view-order-history tr:has(.order-history-thumbs:empty) td.order-history-col-total { grid-row:2; }
  #view-order-history .order-history-total-row { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,3fr); align-items:baseline; gap:2px 12px; margin:0; }
  #view-order-history .order-history-total-meta { grid-column:1; grid-row:2; display:block; }
  #view-order-history .order-history-total-meta .order-history-buyer-date { margin:0; line-height:1.4; }
  #view-order-history .order-history-total-values { display:contents; font-size:15px; line-height:1.35; }
  #view-order-history .order-history-amount-mobile { grid-column:2; grid-row:1; text-align:right; }
  #view-order-history .order-history-payment-mobile { grid-column:2; grid-row:2; display:block; overflow:visible; text-overflow:clip; text-align:right; justify-self:end; width:fit-content; max-width:100%; min-width:0; min-height:0; line-height:1.4; }
  #view-order-history .order-history-payment-mobile.is-empty:not(.has-receipt) { display:none; }
  #view-order-history .order-history-total-row:has(.order-history-payment-mobile.is-empty:not(.has-receipt)) .order-history-total-meta { grid-row:1; }
  #view-order-history td.order-history-col-buyer .order-history-note { display:none; }
  #view-order-history .oh-mobile-note { display:flex; text-align:left; justify-content:flex-start; grid-column:1; grid-row:1; align-items:center; gap:4px; min-width:0; max-width:100%; margin:0; padding:0; color:var(--oh-muted); font:400 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; cursor:pointer; }
  #view-order-history .oh-mobile-note > svg { flex:0 0 14px; color:#8e8e93; }
  #view-order-history .oh-mobile-note .order-history-note-text { text-align:left; display:block; flex:1 1 0; min-width:0; max-width:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #view-order-history .order-history-total-row:has(.order-history-payment-mobile.is-empty:not(.has-receipt)) .oh-mobile-note { grid-column:1/-1; }
  #view-order-history .order-history-total-row:has(.oh-mobile-note[data-oh-note],.oh-mobile-ai .rn-ai-call-chip:not([hidden])):has(.order-history-payment-mobile.is-empty:not(.has-receipt)) :is(.order-history-total-meta,.order-history-amount-mobile) { grid-row:2; }
  #view-order-history .oh-mobile-note:empty, #view-order-history .oh-mobile-ai:not(:has(.rn-ai-call-chip:not([hidden]))) { display:none; }
  #view-order-history .oh-mobile-ai .rn-ai-call-chip { padding:0; border:0; background:none; box-shadow:none; color:inherit; font:inherit; gap:4px; min-height:0; text-align:left; justify-content:flex-start; }
  #view-order-history .oh-name-line > .rn-ai-call-chip, #view-order-history .order-history-buyer-inline-creator, #view-order-history .order-history-buyer-inline-sep { display:none!important; }
  #view-order-history .oh-mobile-creator { display:inline-flex; flex:0 0 auto; align-self:center; }
  #view-order-history .oh-mobile-creator .oh-creator-letter { width:18px; height:18px; flex-basis:18px; border-radius:4px; background:#1d1d1f; border-color:#1d1d1f; color:#fff; }
  #view-order-history .order-history-buyer-address:has(.trsa-maps-btn) { cursor:pointer; }
  /* Restricted employees do not see the totals cell; retain their original note. */
  body[data-rn-employee]:not([data-rn-public]) #view-order-history td.order-history-col-buyer .order-history-note { display:inline-flex; }
  #view-order-history .order-history-brief { display:none; }
}
/* Existing filter dialog, with compact controls instead of nested cards. */
#order-history-filter-popover { display:flex; flex-direction:column; padding:0; max-height:calc(100vh - 20px); max-height:calc(100dvh - 20px); overflow:hidden; overscroll-behavior:contain; border:1px solid #e5e5ea; border-radius:18px; background:#fff; color:#1d1d1f; box-shadow:0 16px 55px #10102026; font:400 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
#order-history-filter-popover .head { flex:0 0 auto; padding:16px; margin:0; border:0; background:#fff; }
#order-history-filter-popover .title { font-size:18px; font-weight:600; letter-spacing:-.3px; }
#order-history-filter-popover .close { width:32px; height:32px; border:0; border-radius:50%; background:#f3f3f5; color:#6e6e73; box-shadow:none; }
#order-history-filter-popover .body { flex:1 1 auto; min-width:0; min-height:0; display:grid; grid-template-columns:minmax(0,1fr); align-content:start; gap:14px; overflow:auto; overscroll-behavior:contain; padding:4px 16px 16px; }
#order-history-filter-popover[hidden] { display:none!important; }
#order-history-filter-popover .oh-box { border:0; border-radius:0; box-shadow:none; padding:0; background:none; }
#order-history-filter-popover .oh-status-list { display:grid; grid-template-columns:1fr; gap:0; }
#order-history-filter-popover .oh-status-item { display:flex; border:0; border-radius:6px; padding:4px 6px; margin:0; background:none; box-shadow:none; min-height:34px; box-sizing:border-box; font-weight:400; }
#order-history-filter-popover .oh-status-list--grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:2px 4px; }
#order-history-filter-popover .oh-status-list--grid .oh-status-item { gap:6px; min-width:0; padding:4px 2px; align-items:center; }
#order-history-filter-popover .oh-status-list--grid .order-history-status-pill { min-width:0; white-space:normal; text-align:left; }
#order-history-filter-popover .oh-more-statuses { margin-top:8px; }
#order-history-filter-popover .oh-more-statuses summary { cursor:pointer; color:#6e6e73; padding:8px 2px; font-size:13px; }
#order-history-filter-popover .order-history-status-pill { padding:3px 8px; font-size:12px; font-weight:500; line-height:1.3; }
#order-history-filter-popover .oh-status-item:hover { background:#f5f5f7; }
#order-history-filter-popover .oh-input { border:1px solid #dedee3; border-radius:10px; font:400 16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; padding:10px 12px; box-shadow:none; }
#order-history-filter-popover .oh-input:focus-visible { outline:none; border-color:#007aff; box-shadow:0 0 0 3px #007aff20; }
#order-history-filter-popover .oh-field > label { font:500 13px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:#6e6e73; }
#order-history-filter-popover .oh-help { padding:0; margin:0; font-size:12px; font-weight:400; color:#6e6e73; }
#order-history-filter-popover .oh-actions { flex:0 0 auto; position:static; display:flex; justify-content:space-between; align-items:center; min-width:0; background:#fff; padding:12px 16px; margin:0; border-top:1px solid #eee; gap:10px; }
#order-history-filter-popover .oh-actions button { flex:0 0 auto; width:auto; min-width:0; min-height:40px; padding:10px 14px; border:0; border-radius:10px; font:500 14px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; box-shadow:none; }
#order-history-filter-popover .filter-btn-primary { background:#007aff; color:#fff; }
#order-history-filter-popover .filter-btn-secondary { background:none; color:#6e6e73; }
#order-history-filter-popover .oh-actions button:disabled { opacity:.45; cursor:default; }
#order-history-filter-popover .oh-presets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:0; }
#order-history-filter-popover .oh-pill { min-width:0; min-height:40px; padding:9px 10px; border:1px solid transparent; border-radius:9px; background:#f5f5f7; color:#424245; font:400 14px/1.35 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-align:left; box-shadow:none; }
#order-history-filter-popover .oh-pill:hover { background:#ebebef; border-color:transparent; box-shadow:none; }
#order-history-filter-popover .oh-pill.is-selected { background:#edf4ff; border-color:#007aff30; color:#0065d1; font-weight:500; box-shadow:none; }
#order-history-filter-popover .oh-segmented { display:flex; gap:3px; width:fit-content; max-width:100%; padding:3px; border-radius:10px; background:#f0f0f3; }
#order-history-filter-popover .oh-segmented .oh-pill { min-height:36px; padding:7px 16px; text-align:center; border:0; background:transparent; }
#order-history-filter-popover .oh-segmented .oh-pill.is-selected { background:#fff; color:#1d1d1f; box-shadow:0 1px 3px #00000012; }
#order-history-filter-popover .oh-creator-tabs { display:flex; gap:24px; border-bottom:1px solid #eee; margin:0 0 12px; }
#order-history-filter-popover .oh-creator-tabs button { font:400 14px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; border:0; border-bottom:2px solid transparent; border-radius:0; padding:10px 0; background:none; box-shadow:none; color:#6e6e73; }
#order-history-filter-popover .oh-creator-tabs button[aria-selected="true"] { border-color:#1d1d1f; color:#1d1d1f; font-weight:600; }
#order-history-filter-popover [hidden] { display:none!important; }
#order-history-filter-popover .oh-creator-list { display:flex; flex-direction:column; max-height:280px; overflow:auto; overscroll-behavior:contain; }
#order-history-filter-popover .oh-creator-option { display:flex; align-items:center; gap:10px; padding:9px 8px; border-radius:8px; min-height:44px; box-sizing:border-box; font-size:14px; font-weight:400; cursor:pointer; margin:0; }
#order-history-filter-popover .oh-creator-option:hover { background:#f5f5f7; }
#order-history-filter-popover .oh-creator-option input { margin:0 0 0 auto; flex:0 0 18px; }
#order-history-filter-popover .oh-creator-avatar { display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px; min-width:34px; max-width:34px; min-height:34px; max-height:34px; aspect-ratio:1; overflow:hidden; border-radius:50%; background:#f0f0f3; color:#6e6e73; font-size:12px; text-transform:uppercase; }
#order-history-filter-popover .oh-creator-copy { display:grid; min-width:0; gap:2px; }
#order-history-filter-popover .oh-creator-copy strong { font-weight:500; overflow-wrap:anywhere; }
#order-history-filter-popover .oh-creator-copy small { font-size:12px; }
#order-history-filter-popover .oh-creator-search { display:flex; align-items:center; gap:8px; border:1px solid #e5e5ea; border-radius:10px; background:#f5f5f7; padding:0 10px; margin:0 0 8px; }
#order-history-filter-popover .oh-creator-search svg { flex:0 0 18px; color:#8e8e93; }
#order-history-filter-popover .oh-creator-search input { color:#1d1d1f; -webkit-text-fill-color:#1d1d1f; caret-color:#007aff; color-scheme:light; width:100%; min-width:0; border:0; padding:10px 0; margin:0; background:none; outline:none; box-shadow:none; font:400 16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
#order-history-filter-popover .oh-creator-search input::placeholder { color:#8e8e93; -webkit-text-fill-color:#8e8e93; }
#order-history-filter-popover [data-oh-user-results] { display:flex; flex-direction:column; }
#order-history-filter-popover .oh-creator-more { flex:0 0 auto; padding:10px; border:0; background:none; color:#007aff; font:inherit; cursor:pointer; }
#order-history-filter-popover .oh-creator-role--customer { color:#267342; }
#order-history-filter-popover .oh-creator-role--guest { color:#6e6e73; }
#order-history-filter-popover .oh-creator-role--admin { color:#2854b5; }
#order-history-filter-popover .oh-creator-role--employee { color:#a36525; }
#order-history-filter-popover .oh-creator-role--superadmin { color:#7743aa; }
#order-history-filter-popover .oh-creator-message { color:#6e6e73; padding:12px 8px; margin:0; font-size:13px; }
#order-history-filter-popover :is(button,input,summary):focus-visible { outline:2px solid #007aff; outline-offset:2px; }
@media(max-width:640px) { #order-history-filter-popover .oh-creator-option { min-height:48px; } }
#order-history-filter-popover .oh-creator-avatar img { display:block; width:34px; height:34px; min-width:34px; max-width:34px; min-height:34px; max-height:34px; aspect-ratio:1; padding:0; margin:0; border:0; border-radius:50%; object-fit:cover; }
#view-order-history .oh-row-annotations .order-history-note { cursor:pointer; }
#view-order-history .oh-row-annotations .order-history-note:is(:hover,:focus-visible) { color:#007aff; }
/* Keep expanded details inside their own row; map pins retain the existing action. */
#view-order-history .oh-row-annotations:has(.order-history-note.is-expanded) { flex-wrap:wrap; }
#view-order-history .oh-row-annotations .order-history-note.is-expanded { flex-basis:100%; align-items:flex-start; overflow:visible; }
#view-order-history .order-history-note.is-expanded .order-history-note-text { display:block; white-space:pre-wrap; overflow-wrap:anywhere; max-width:none; }
#view-order-history .order-history-note.is-expanded::after { content:none; }
#view-order-history .oh-address-summary { display:inline-flex; align-items:center; gap:3px; border:0; padding:0; min-height:22px; background:none; box-shadow:none; color:inherit; font:inherit; text-align:left; cursor:pointer; }
#view-order-history .oh-address-summary:hover { text-decoration:underline; text-underline-offset:3px; }
#view-order-history [data-oh-address-summary] { display:contents; }
#view-order-history .oh-address-actions { display:flex; align-items:center; gap:10px; margin-top:1px; white-space:nowrap; color:var(--oh-muted); font-size:11px; }
#view-order-history .oh-address-full { display:block; white-space:normal; overflow-wrap:anywhere; }
#view-order-history .oh-address-full[hidden] { display:none; }
#view-order-history [data-oh-address-summary] .trsa-maps-btn { display:inline-flex; align-items:center; gap:3px; margin:0; padding:0; border:0; width:auto; height:22px; flex:0 0 auto; color:var(--oh-muted); font:inherit; }
#view-order-history [data-oh-address-summary] .trsa-maps-btn svg { width:14px; height:14px; }
#view-order-history [data-oh-address-summary] .trsa-maps-btn:hover { color:var(--oh-ink); background:#f3f5f9; }
#view-order-history .order-history-creator-stack { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; text-align:left; gap:6px; }
#view-order-history .oh-creator-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.oh-creator-letter { display:inline-flex; align-items:center; justify-content:center; flex:0 0 20px; width:20px; height:20px; box-sizing:border-box; border:1px solid #e5e5ea; border-radius:6px; font:400 11px/1 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:#6e6e73; }
#view-order-history [data-oh-creator-hint] { position:relative; cursor:help; }
#view-order-history [data-oh-creator-hint]::after { content:attr(data-oh-creator-hint); position:absolute; left:0; bottom:calc(100% + 6px); z-index:5; padding:7px 10px; border:1px solid var(--oh-line); border-radius:8px; background:#fff; box-shadow:0 4px 16px #00000012; color:var(--oh-ink); font:400 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-align:left; white-space:nowrap; opacity:0; visibility:hidden; pointer-events:none; }
#view-order-history [data-oh-creator-hint]:is(:hover,:focus-visible)::after { opacity:1; visibility:visible; }
#view-order-history [data-oh-creator-hint]:focus-visible { outline:2px solid #007aff; outline-offset:2px; }
/* The loading control never participates in title sizing. */
#view-order-history .order-history-header { position:relative; }
#view-order-history .order-history-header .cart-heading { position:relative; margin:0; white-space:nowrap; }
#view-order-history .order-history-load-indicator { position:absolute; top:50%; left:auto; right:calc(100% + 12px); margin:0; transform:translateY(-50%); white-space:nowrap; }
@media (hover:hover) and (pointer:fine) {
 #view-order-history [data-oh-address-summary] .oh-address-actions { opacity:0; }
 #view-order-history .order-history-row:is(:hover,:focus-within) [data-oh-address-summary] .oh-address-actions,
 #view-order-history [data-oh-address-summary].is-expanded .oh-address-actions { opacity:1; }
}
@media screen and (max-width:640px) {
 #view-order-history .order-history-load-indicator { padding:0; width:16px; height:16px; right:-20px; border:0; background:none; box-shadow:none; }
 #view-order-history #order-history-load-indicator-text { display:none; }
 #view-order-history .oh-row-annotations .order-history-note:not(.is-expanded) .order-history-note-text { display:none; }
 #view-order-history .oh-row-annotations .order-history-note:not(.is-expanded)::after { content:'Napomena'; }
}

#order-history-filter-popover input[type="checkbox"][data-filter-value] { appearance:none; -webkit-appearance:none; display:inline-block; position:relative; width:18px; height:18px; min-width:18px; max-width:18px; min-height:18px; max-height:18px; padding:0; border:1px solid #c7c7cc; border-radius:5px; background:#fff; box-shadow:none; vertical-align:middle; cursor:pointer; }
#order-history-filter-popover input[type="checkbox"][data-filter-value]:checked { background:#007aff; border-color:#007aff; }
#order-history-filter-popover input[type="checkbox"][data-filter-value]::after { content:none; }
#order-history-filter-popover input[type="checkbox"][data-filter-value]:checked::after { content:""; display:block; position:absolute; width:4px; height:8px; left:5px; top:2px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg); }

#order-history-filter-popover .oh-status-item .order-history-status-pill { box-shadow:none; }

/* Payment results keep their established meaning, even when the row wraps. */
#view-order-history .oh-payment-channel { display:inline-block; white-space:nowrap; }
#view-order-history .order-history-payment-link.has-receipt:not([data-oh-receipt-only]) .order-history-payment-main::after { content:'\00a0·'; }
#view-order-history .order-history-payment-link .order-history-payment-receipt-note { margin-left:3px; }
#view-order-history .order-history-payment-link[data-oh-receipt-only] .order-history-payment-receipt-note { margin-left:0; }
#view-order-history .order-history-payment-link:is(.is-card-paid,[data-card-payment-status="paid"]) { color:#32754b!important; }
#view-order-history .order-history-payment-link:is([data-card-payment-status="failed"],[data-card-payment-status="refunded"],.order-history-payment-link--refunded,.order-history-payment-link--failed) { color:#b42318!important; }
#view-order-history .oh-buyer-name-mobile { display:none; }
@media screen and (min-width:641px) {
 #view-order-history .oh-name-line .order-history-buyer-text { font-weight:600; }
 #view-order-history .oh-creator-name { font-size:12px; font-weight:400; color:var(--oh-muted); }
 #view-order-history .order-history-thumbs { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:4px; max-width:176px; margin-left:auto; }
 #view-order-history .order-history-thumb--mobile-extra { display:none; }
}
@media screen and (max-width:640px) {
 #view-order-history .oh-buyer-name-desktop { display:none; }
 #view-order-history .oh-buyer-name-mobile { display:inline; }
 #view-order-history .oh-address-summary { display:none; }
 #view-order-history [data-oh-address-summary] { display:inline-flex; align-items:center; gap:4px; }
 #view-order-history .oh-address-map-action span { display:none; }
}
/* Full-address disclosure is only for desktop admins with a mouse/trackpad. */
#view-order-history .oh-address-summary:not([data-oh-map-allowed]) { display:none; }
@media (hover:none), (pointer:coarse) {
 #view-order-history .oh-address-summary { display:none; }
 #view-order-history [data-oh-address-summary] { display:inline-flex; align-items:center; gap:4px; }
 #view-order-history .oh-address-map-action span { display:none; }
}

/* All secondary mobile details share one text baseline and icon rhythm. */
@media screen and (max-width:640px) {
  #view-order-history .oh-row-context :is(.order-history-buyer-address,.oh-row-annotations,.order-history-address-text,.oh-address-actions) { font:400 12px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--oh-muted); }
  #view-order-history .oh-row-context .oh-address-actions { margin:0; }
  #view-order-history .oh-row-context :is(.trsa-maps-btn,.order-history-note,.rn-ai-call-chip) { min-height:20px; height:auto; align-items:center; }
  #view-order-history .oh-row-context :is(.trsa-maps-btn,.order-history-note-icon,.rn-ai-call-chip) svg { width:14px; height:14px; flex:0 0 14px; }
  #view-order-history .order-history-payment-mobile { padding-top:0; padding-bottom:0; }
}
#view-order-history .order-history-payment-link .order-history-payment-receipt-note.is-reversed { color:#b42318; }

/* Read status hierarchy down the first column, then down the second. */
#order-history-filter-popover .oh-status-list--grid {
  grid-auto-flow:column;
  grid-template-rows:repeat(var(--oh-status-rows),auto);
}
#order-history-filter-popover .oh-creator-tabs { gap:0; justify-content:space-between; }
#order-history-filter-popover .oh-creator-tabs button { padding:10px 4px; }

/* Three quiet lines replace the two sparse admin columns. Mobile keeps its existing layout. */
@media screen and (min-width:641px) {
  #view-order-history .order-history-table { min-width:1280px; }
  #view-order-history th.order-history-col-creator { width:136px; min-width:136px; white-space:nowrap; }
  /* Keep the five-thumbnail grid close to the total; let names use spare room. */
  #view-order-history th.order-history-col-content { width:196px; }
  #view-order-history th.order-history-col-buyer { width:auto; }
  #view-order-history th.order-history-col-total { width:124px; }
  /* Match the largest visible thumbnail row instead of reserving five slots for every list. */
  #view-order-history .order-history-table:has(.order-history-row) th.order-history-col-content { width:96px; }
  #view-order-history .order-history-table:has(.order-history-thumbs > :nth-child(3):not(.order-history-thumb--mobile-extra)) th.order-history-col-content { width:124px; }
  #view-order-history .order-history-table:has(.order-history-thumbs > :nth-child(4):not(.order-history-thumb--mobile-extra)) th.order-history-col-content { width:160px; }
  #view-order-history .order-history-table:has(.order-history-thumbs > :nth-child(5):not(.order-history-thumb--mobile-extra)) th.order-history-col-content { width:196px; }
  #view-order-history .oh-creator-payment { cursor:pointer; }
  #view-order-history .oh-account-lines { display:flex; flex-direction:column; align-items:stretch; gap:0; padding:4px; margin:-4px; border-radius:6px; font:400 11.5px/15px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--oh-muted); }
  #view-order-history .oh-creator-payment:is(:hover,:focus-within) .oh-account-lines { background:#eeeef2; }
  #view-order-history .oh-account-lines .order-history-creator-stack { min-height:15px; gap:6px; }
  #view-order-history .oh-account-lines .oh-creator-letter { width:16px; height:16px; flex-basis:16px; border-radius:4px; font-size:10px; }
  #view-order-history .oh-account-lines .oh-creator-name { font:inherit; opacity:.5; }
  #view-order-history .oh-account-lines .oh-creator-letter:not(.oh-creator-letter--buyer) { color:rgba(110,110,115,.5); border-color:rgba(229,229,234,.5); }
  #view-order-history .oh-account-lines .order-history-payment-link { position:relative; display:block; width:100%; min-height:0; padding:0 0 0 22px; margin:0; border:0; border-radius:4px; text-align:left; font:inherit; line-height:15px; white-space:normal; }
  #view-order-history .oh-account-lines .order-history-payment-link:is(:hover,:focus-visible,:active) { background:transparent; box-shadow:none; outline-offset:2px; }
  #view-order-history .oh-account-lines .order-history-payment-link::before { content:''; position:absolute; left:0; top:0; width:16px; height:16px; background:currentColor; mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E"); }
  #view-order-history .oh-account-lines .order-history-payment-link:has([data-oh-payment-empty])::before { mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20M17 6H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E"); }
  #view-order-history .oh-account-lines .order-history-payment-link:has([data-oh-payment-empty])::before,
  #view-order-history .oh-account-lines [data-oh-payment-empty] { opacity:.5; }
  #view-order-history .oh-account-lines .order-history-payment-link:is([data-payment-status="placeno_u_celosti"],[data-payment-status="avans_placeno"],[data-card-payment-status="paid"])::before { mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E"); }
  #view-order-history .oh-account-lines .order-history-payment-link:is([data-payment-status="nije_placeno"],[data-card-payment-status="failed"],[data-card-payment-status="refunded"],[data-card-payment-status="voided"],[data-payment-status="failed"],[data-payment-status="refunded"],[data-payment-status="voided"])::before { mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='m6 6 12 12M6 18 18 6'/%3E%3C/svg%3E"); }
  #view-order-history .oh-account-lines .order-history-payment-link.has-receipt .order-history-payment-main::after { content:none; }
  #view-order-history .oh-account-lines .order-history-payment-link:has(.oh-payment-channel)::before { mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18M7 15h3'/%3E%3C/svg%3E"); }
  #view-order-history .oh-account-lines .order-history-payment-link .order-history-payment-receipt-note { position:relative; display:block; width:fit-content; margin:0; padding:0; line-height:15px; font-size:inherit; font-weight:400; white-space:normal; }
  #view-order-history .oh-account-lines .order-history-payment-link .order-history-payment-receipt-note::before { content:''; position:absolute; left:-22px; top:0; width:16px; height:16px; background:currentColor; mask:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3 8 5l4-2 4 2 3-2v18l-3-2-4 2-4-2-3 2Z M9 9h6M9 13h6M9 17h3'/%3E%3C/svg%3E"); }
  #view-order-history .oh-account-lines .order-history-payment-link[data-oh-receipt-only]::before { content:none; }
}
@media screen and (min-width:641px) and (hover:hover) and (pointer:fine) {
  #view-order-history .oh-delivery-details:has(.oh-address-actions):not(:has(.is-expanded)) { transform:translateY(10px); transition:transform 150ms ease; }
  #view-order-history .order-history-row:is(:hover,:focus-within) .oh-delivery-details:has(.oh-address-actions) { transform:translateY(0); }
  #view-order-history .oh-address-actions { transition:opacity 150ms ease; }
}
@media (prefers-reduced-motion:reduce) {
  #view-order-history .oh-delivery-details, #view-order-history .oh-address-actions { transition:none!important; }
}

/* Desktop contact actions have a dedicated line for every linked buyer. */
#view-order-history .oh-buyer-hover-tools { display:none; }
@media screen and (min-width:641px) {
  #view-order-history .oh-buyer-hover-tools { display:block; min-height:22px; }
  #view-order-history .oh-buyer-hover-tools .oh-inline-contacts { gap:9px; max-width:100%; }
  #view-order-history .oh-buyer-hover-tools .order-history-phone-actions { gap:9px; }
  #view-order-history .oh-buyer-hover-tools .oh-inline-contacts :is(.order-history-linked-customer-icon,.rn-order-phone-action,.oh-customer-orders) { width:auto; flex:0 0 auto; min-height:22px; height:auto; display:inline-flex; align-items:center; gap:3px; margin:0; padding:0; border:0; background:none; color:var(--oh-muted); font:400 11px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; text-decoration:none; white-space:nowrap; cursor:pointer; }
  #view-order-history .oh-buyer-hover-tools .oh-inline-contacts button:hover { color:var(--oh-ink); background:none; }
  #view-order-history .oh-buyer-hover-tools .oh-inline-contacts svg { width:14px; height:14px; flex:0 0 14px; }
  #view-order-history .oh-customer-orders[aria-disabled=true] { cursor:default; }
  #view-order-history .oh-customer-orders:focus-visible { outline:2px solid #007aff; outline-offset:3px; border-radius:3px; }
  #view-order-history .oh-customer-orders:is(:hover,:focus-visible) .oh-orders-bag-body { fill:currentColor; }
  #view-order-history .oh-orders-spinner { display:none; width:12px; height:12px; border:1.5px solid #d1d1d6; border-top-color:currentColor; border-radius:50%; box-sizing:border-box; animation:oh-orders-spin .7s linear infinite; }
  #view-order-history .oh-customer-orders[aria-busy=true] .oh-orders-spinner { display:inline-block; }
  #view-order-history .oh-customer-orders[aria-busy=true] svg { display:none; }
}
@media screen and (min-width:641px) and (hover:hover) and (pointer:fine) {
  #view-order-history .oh-buyer-hover .oh-name-line { transform:translateY(10px); transition:transform 150ms ease; }
  #view-order-history .oh-buyer-hover-tools { opacity:0; pointer-events:none; transform:translateY(6px); transition:opacity 150ms ease, transform 150ms ease; }
  #view-order-history .order-history-row:is(:hover,:focus-within) .oh-buyer-hover .oh-name-line,
  #view-order-history .order-history-row:is(:hover,:focus-within) .oh-buyer-hover-tools { transform:translateY(0); }
  #view-order-history .order-history-row:is(:hover,:focus-within) .oh-buyer-hover-tools { opacity:1; pointer-events:auto; }
}
@keyframes oh-orders-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) {
  #view-order-history .oh-buyer-hover .oh-name-line,
  #view-order-history .oh-buyer-hover-tools { transition:none; }
  #view-order-history .oh-orders-spinner { animation:none; }
}

#view-order-history .oh-creator-letter--buyer { background:#48484a; border-color:#48484a; color:#fff; }

/* Full notes and addresses share a small, non-blocking detail popover. */
.oh-detail-popover { position:fixed; z-index:210000; width:360px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); box-sizing:border-box; display:flex; flex-direction:column; background:#fff; color:#1d1d1f; border:1px solid #e5e5ea; border-radius:14px; box-shadow:0 8px 30px #00000020; font:400 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
.oh-detail-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px 8px 16px; border-bottom:1px solid #eeeef2; font-weight:500; }
.oh-detail-head button { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; border:0; border-radius:50%; background:#f5f5f7; color:#6e6e73; padding:0; cursor:pointer; }
.oh-detail-head button:hover { background:#e8e8ed; }
.oh-detail-content { padding:12px 16px 16px; overflow:auto; overscroll-behavior:contain; white-space:pre-wrap; overflow-wrap:anywhere; min-height:0; }
@media screen and (min-width:641px) and (hover:hover) and (pointer:fine) {
  #view-order-history .oh-note-cta { display:inline-block; visibility:hidden; }
  #view-order-history .order-history-row:is(:hover,:focus-within) .oh-note-cta { visibility:visible; }
  #view-order-history .oh-name-line .order-history-note:is(:hover,:focus-visible) { color:#007aff; }
  #view-order-history .oh-name-line .order-history-note:is(:hover,:focus-visible) .order-history-note-icon { color:inherit; }
}

/* A padded hover surface without changing text positions or column widths. */
@media screen and (min-width:641px) and (hover:hover) and (pointer:fine) {
  #view-order-history .order-history-row :is(.oh-name-line .rn-ai-call-chip,.oh-name-line .order-history-note,.oh-address-actions button,.oh-buyer-hover-tools button):is(:hover,:focus-visible) {
    color:#007aff; background:#eaf2ff; box-shadow:0 0 0 3px #eaf2ff; border-radius:4px; text-decoration:none;
  }
  #view-order-history .order-history-row :is(.oh-name-line .rn-ai-call-chip,.oh-name-line .order-history-note,.oh-address-actions button,.oh-buyer-hover-tools button):is(:hover,:focus-visible) svg { color:inherit; }
  #view-order-history .oh-account-lines:has([data-oh-payment-empty]):not(:has(.has-receipt)) {
    transform:translateY(8px); transition:transform 150ms ease;
  }
  #view-order-history .oh-account-lines .order-history-payment-link:has([data-oh-payment-empty]):not(.has-receipt) {
    opacity:0; pointer-events:none; transition:opacity 150ms ease; width:fit-content;
    /* Reserve space for the 3px hover surface below the creator line. */
    margin-top:4px;
  }
  #view-order-history .order-history-row:is(:hover,:focus-within) .oh-account-lines:has([data-oh-payment-empty]):not(:has(.has-receipt)) { transform:translateY(0); }
  #view-order-history .order-history-row:is(:hover,:focus-within) .oh-account-lines .order-history-payment-link:has([data-oh-payment-empty]):not(.has-receipt) { opacity:.5; pointer-events:auto; color:var(--oh-muted)!important; background:none; box-shadow:none; }
  #view-order-history .oh-account-lines .order-history-payment-link:has([data-oh-payment-empty])::before,
  #view-order-history .oh-account-lines [data-oh-payment-empty] { opacity:1; }
}
@media screen and (min-width:641px) {
  #view-order-history .oh-account-lines .has-receipt [data-oh-payment-empty] { display:none; }
  #view-order-history .oh-account-lines .has-receipt:has([data-oh-payment-empty])::before { content:none; }
}
@media (prefers-reduced-motion:reduce) {
  #view-order-history .oh-account-lines, #view-order-history .oh-account-lines .order-history-payment-link { transition:none!important; }
}

@media screen and (min-width:641px) and (hover:hover) and (pointer:fine) {
  #view-order-history .order-history-row .oh-account-lines .order-history-payment-link:has([data-oh-payment-empty]):not(.has-receipt):is(:hover,:focus-visible) { opacity:1; color:#007aff!important; background:#eaf2ff; box-shadow:0 0 0 3px #eaf2ff; }
}
.order-history-payment-header { position:relative; padding-right:42px; }
.order-history-payment-close { position:absolute; top:4px; right:2px; display:grid; place-items:center; width:30px; height:30px; padding:0; border:0; border-radius:50%; background:#f5f5f7; color:#6e6e73; cursor:pointer; }
.order-history-payment-close:is(:hover,:focus-visible) { color:#1d1d1f; background:#e8e8ed; }
.order-history-payment-close:focus-visible { outline:2px solid #007aff; outline-offset:2px; }

/* Expanded receipt details retain every issued document; the table stays compact. */
.order-history-payment-menu .order-history-payment-receipts { line-height:2; }
.order-history-payment-menu .order-history-payment-receipts .order-history-payment-receipt { display:inline-flex; width:auto; max-width:100%; vertical-align:middle; margin:0; padding:4px 0; }
.order-history-payment-receipt-comma { color:#6e6e73; margin-right:4px; }
.order-history-payment-reversal { color:#b42318; }
