/* FariDocs 1.22.4 — precise mobile Workspace and split Email Delivery tabs. */
html, body { max-width: 100%; overflow-x: clip; }
.workspace-app, .workspace-main, .workspace-panel, .delivery-tab-content { min-width: 0; max-width: 100%; }
.delivery-tab-content { width: 100%; }
.delivery-center-tabs { width: fit-content; max-width: 100%; margin-bottom: 14px; }
.delivery-center-tabs a { min-width: 150px; justify-content: center; }
.delivery-compose { width: min(920px, 100%); }
.delivery-history { width: 100%; }
.delivery-history-table { min-width: 940px; table-layout: fixed; }
.delivery-history-table th:nth-child(1) { width: 15%; }
.delivery-history-table th:nth-child(2) { width: 14%; }
.delivery-history-table th:nth-child(3) { width: 12%; }
.delivery-history-table th:nth-child(4) { width: 16%; }
.delivery-history-table th:nth-child(5) { width: 22%; }
.delivery-history-table th:nth-child(6) { width: 12%; }
.delivery-history-table th:nth-child(7) { width: 9%; }
.delivery-history-table td { overflow-wrap: anywhere; }
.delivery-recipient { word-break: break-word; }
.approval-pill {
    display: inline-flex;
    width: fit-content;
    padding: 4px 7px;
    border-radius: 999px;
    background: #edf3f5;
    color: #607b88;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .04em;
}
.approval-accepted { background: #dff8ef; color: #087560; }
.approval-rejected { background: #ffe6e4; color: #a9332b; }
.approval-pending { background: #fff0d9; color: #8a5608; }
.delivery-response-note { margin-top: 5px; line-height: 1.45; color: #506d7a; }
.delivery-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.delivery-row-actions form { margin: 0; }
.signed-pdf-action { border-color: #83d0c7 !important; background: #edfaf8 !important; color: #087b70 !important; }
.muted-text { color: #8ba0aa; }

html[data-theme="dark"] .approval-pill { background: #193b47; color: #b8cbd2; }
html[data-theme="dark"] .approval-accepted { background: #143f3c; color: #7be0c8; }
html[data-theme="dark"] .approval-rejected { background: #412930; color: #ffb4bc; }
html[data-theme="dark"] .approval-pending { background: #44351f; color: #ffd28a; }
html[data-theme="dark"] .delivery-response-note { color: #a9bec6; }

@media (max-width: 900px) {
    .delivery-history-table { min-width: 0 !important; width: 100%; display: block; }
    .delivery-history-table thead { display: none; }
    .delivery-history-table tbody { display: grid; gap: 10px; }
    .delivery-history-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: hidden;
        border: 1px solid var(--ws-line, #d8e5ea);
        border-radius: 12px;
        background: var(--ws-panel, #fff);
    }
    .delivery-history-table td {
        display: block;
        min-width: 0;
        padding: 10px 12px;
        border-bottom: 1px solid var(--ws-line, #d8e5ea);
    }
    .delivery-history-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 5px;
        color: #7b919b;
        font-size: 7px;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .delivery-history-table td:first-child,
    .delivery-history-table td:nth-child(5),
    .delivery-history-table td:last-child { grid-column: 1 / -1; }
    .delivery-history-table td:last-child { border-bottom: 0; }
    .delivery-history-table .empty-state { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
    .workspace-authenticated .workspace-topbar {
        width: 100%;
        min-height: 50px;
        padding: 5px max(8px, env(safe-area-inset-right)) 5px max(8px, env(safe-area-inset-left));
    }
    .workspace-authenticated .workspace-image-brand { width: 106px; min-width: 106px; height: 32px; }
    .workspace-authenticated .workspace-top-actions { min-width: 0; margin-left: auto; gap: 5px; }
    .workspace-authenticated .workspace-sidebar {
        width: 100%;
        max-width: 100%;
        padding: 6px max(7px, env(safe-area-inset-right)) 6px max(7px, env(safe-area-inset-left));
        border-radius: 0;
    }
    .workspace-authenticated .workspace-sidebar > div { display: none; }
    .workspace-authenticated .workspace-sidebar nav { scroll-padding-inline: 8px; }
    .workspace-authenticated .workspace-sidebar nav a {
        min-width: 68px;
        min-height: 38px;
        flex-direction: row;
        justify-content: center;
        gap: 4px;
        padding: 4px 6px;
        white-space: nowrap;
    }
    .workspace-authenticated .workspace-main {
        width: 100%;
        margin: 0;
        padding: 14px max(10px, env(safe-area-inset-right)) 48px max(10px, env(safe-area-inset-left));
    }
    .workspace-authenticated .workspace-heading { margin: 0 0 10px; }
    .workspace-authenticated .workspace-heading h1 { margin-top: 3px; font-size: clamp(22px, 7vw, 27px); line-height: 1.12; }
    .workspace-authenticated .workspace-heading p { margin: 3px 0 0; font-size: 9.5px; }
    .workspace-authenticated .workspace-panel { border-radius: 12px; }
    .delivery-center-tabs { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
    .delivery-center-tabs a { min-width: 0; width: 100%; padding-inline: 7px; }
    .delivery-recipient-grid { grid-template-columns: 1fr; }
    .delivery-compose .workspace-button.primary { width: 100%; }
}

@media (max-width: 620px) {
    .workspace-authenticated .workspace-user-menu-name { display: none; }
    .workspace-authenticated .workspace-user-menu-trigger { padding-right: 4px; }
    .workspace-authenticated .workspace-user-menu-trigger .menu-chevron { display: none; }
    .delivery-history-table tr { grid-template-columns: 1fr; }
    .delivery-history-table td,
    .delivery-history-table td:first-child,
    .delivery-history-table td:nth-child(5),
    .delivery-history-table td:last-child { grid-column: 1; }
    .delivery-history-table td:last-child { border-bottom: 0; }
    .delivery-history .panel-heading { align-items: flex-start; }
}

@media (max-width: 420px) {
    .workspace-authenticated .workspace-image-brand { width: 86px; min-width: 86px; }
    .workspace-authenticated .language-track { width: 54px !important; }
    .workspace-authenticated .workspace-sidebar nav a { min-width: 61px; font-size: 7.5px; }
    .workspace-authenticated .workspace-main { padding-inline: 8px; }
    .delivery-center-tabs a { min-height: 42px; font-size: 8.5px; }
    .delivery-center-tabs a svg { display: none; }
    .delivery-compose { padding: 12px !important; }
    .delivery-options { padding: 11px; }
}
