/* Order delivery tools: reveal and copy a buyer's own delivered-data list. */
body.customer-surface .delivered-section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

body.customer-surface .delivered-action,
body.customer-surface .delivered-bulk-panel footer button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--depth-border, #cbd8ec);
    border-radius: 8px;
    background: color-mix(in srgb, var(--depth-surface, #fff) 92%, #e7efff);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 55%), 0 4px 10px rgb(38 67 120 / 7%);
    padding: 0 10px;
    color: var(--depth-text, #15243c);
    font: inherit;
    font-size: 9px;
    font-weight: 780;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

body.customer-surface .delivered-action .ui-icon,
body.customer-surface .delivered-bulk-panel footer button .ui-icon {
    width: 14px;
    height: 14px;
}

body.customer-surface .delivered-view-all {
    border-color: color-mix(in srgb, var(--depth-cobalt, #205cf2) 36%, var(--depth-border, #cbd8ec));
    color: var(--depth-cobalt, #205cf2);
}

body.customer-surface .delivered-copy-all {
    border-color: color-mix(in srgb, #0d9c6c 38%, var(--depth-border, #cbd8ec));
    background: color-mix(in srgb, #ebfbf4 76%, var(--depth-surface, #fff));
    color: #087a52;
}

body.customer-surface .delivered-download-all {
    border-color: color-mix(in srgb, #ef4c5b 34%, var(--depth-border, #cbd8ec));
    color: #c93245;
}

body.customer-surface .delivered-action:hover,
body.customer-surface .delivered-bulk-panel footer button:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
}

body.customer-surface .delivered-action:focus-visible,
body.customer-surface .delivered-bulk-panel footer button:focus-visible,
body.customer-surface .delivered-bulk-panel textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--depth-cobalt, #205cf2) 38%, transparent);
    outline-offset: 2px;
}

body.customer-surface .delivered-action.is-copied,
body.customer-surface .delivered-bulk-panel footer button.is-copied {
    border-color: #65b895;
    background: #e7f8ef;
    color: #08764e;
}

body.customer-surface .delivered-bulk-panel {
    overflow: hidden;
    margin: -2px 0 12px;
    border: 1px solid var(--depth-border, #cbd8ec);
    border-radius: 12px;
    background: color-mix(in srgb, var(--depth-surface, #fff) 94%, #ddeaff);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 62%), 0 8px 18px rgb(32 68 135 / 8%);
}

body.customer-surface .delivered-bulk-panel > header,
body.customer-surface .delivered-bulk-panel > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
}

body.customer-surface .delivered-bulk-panel > header {
    border-bottom: 1px solid var(--depth-border, #cbd8ec);
}

body.customer-surface .delivered-bulk-panel > header b {
    color: var(--depth-text, #15243c);
    font-size: 11px;
}

body.customer-surface .delivered-bulk-panel > header p,
body.customer-surface .delivered-bulk-panel > footer > span {
    margin: 3px 0 0;
    color: var(--depth-muted, #667085);
    font-size: 8px;
    line-height: 1.45;
}

body.customer-surface .delivered-bulk-panel > header > span {
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--depth-cobalt, #205cf2) 25%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--depth-cobalt, #205cf2) 10%, transparent);
    padding: 4px 7px;
    color: var(--depth-cobalt, #205cf2);
    font-size: 8px;
    font-weight: 790;
}

body.customer-surface .delivered-bulk-panel textarea {
    width: calc(100% - 24px);
    min-height: 156px;
    max-height: 330px;
    display: block;
    resize: vertical;
    margin: 12px;
    border: 1px solid var(--depth-border, #cbd8ec);
    border-radius: 8px;
    background: color-mix(in srgb, var(--depth-surface-muted, #f4f7fc) 86%, #fff);
    padding: 10px;
    color: var(--depth-text, #15243c);
    font: 600 10px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    overflow: auto;
    white-space: pre;
}

body.customer-surface .delivered-bulk-panel > footer {
    border-top: 1px solid var(--depth-border, #cbd8ec);
}

body.customer-surface .delivered-bulk-panel > footer > span {
    margin: 0;
}

body.customer-surface .delivered-bulk-panel > footer button {
    flex: 0 0 auto;
    border-color: color-mix(in srgb, #0d9c6c 42%, var(--depth-border, #cbd8ec));
    background: #0d9c6c;
    color: #fff;
    box-shadow: 0 6px 14px rgb(13 156 108 / 22%);
}

html[data-color-scheme="dark"] body.customer-surface .delivered-action,
html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel footer button {
    border-color: #33445e;
    background: #121e31;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%), 0 7px 15px rgb(0 0 0 / 18%);
    color: #eef5ff;
}

html[data-color-scheme="dark"] body.customer-surface .delivered-view-all { color: #8fb7ff; }
html[data-color-scheme="dark"] body.customer-surface .delivered-copy-all { background: #102a27; color: #78e1bc; }
html[data-color-scheme="dark"] body.customer-surface .delivered-download-all { color: #ffadb6; }
html[data-color-scheme="dark"] body.customer-surface .delivered-action.is-copied { background: #123326; color: #92e8c5; }

html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel {
    border-color: #33445e;
    background: #0d1727;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%), 0 9px 22px rgb(0 0 0 / 24%);
}

html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel > header,
html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel > footer { border-color: #33445e; }
html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel > header b { color: #f5f8ff; }
html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel > header p,
html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel > footer > span { color: #aabbd4; }
html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel > header > span { border-color: #385c94; background: #172b48; color: #b9d3ff; }
html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel textarea { border-color: #33445e; background: #091221; color: #f3f7ff; }
html[data-color-scheme="dark"] body.customer-surface .delivered-bulk-panel > footer button { border-color: #34856a; background: #087b54; color: #fff; }

@media (max-width: 640px) {
    body.customer-surface .delivered-section > .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    body.customer-surface .delivered-section-actions { justify-content: flex-start; }
    body.customer-surface .delivered-action { flex: 1 1 auto; }
    body.customer-surface .delivered-bulk-panel > header,
    body.customer-surface .delivered-bulk-panel > footer { align-items: flex-start; flex-direction: column; }
    body.customer-surface .delivered-bulk-panel > footer button { width: 100%; }
}
