/* Customer Documents modal (e/customers -> View -> Documents)
   Compact one-row-per-document layout: the secondary facts (package, record id,
   created date, IP) sit on a sub-line under the name rather than each taking a
   column, so the whole modal fits in modal-lg instead of modal-xl.
   Loaded after bit-card-refresh.css so the equal-!important rules here win. */

/* ---- Section / card chrome ------------------------------------------------ */

.documents-modal-tables .doc-section {
    margin-bottom: 0.75rem;
}

.documents-modal-tables .doc-section:last-child {
    margin-bottom: 0;
}

.documents-modal-tables .card.bit-card .card-body {
    padding: 0.55rem 0.7rem !important;
}

/* Panel titles (Documents to Sign / Uploaded Documents / Acknowledgments) */
.documents-modal-tables .card.bit-card .card-icon-header .content h6 {
    font-size: 0.82rem !important;
}

.documents-modal-tables .doc-hint {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 0.4rem;
}

/* ---- Table type ----------------------------------------------------------- */
/* Bigger than the old 9px/11px — the compression comes from dropping columns,
   not from shrinking the text further. */

.documents-modal-tables .card.bit-card .card-body thead th {
    font-size: 10px !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 5px 8px !important;
    white-space: nowrap;
}

.documents-modal-tables .card.bit-card .card-body tbody td {
    font-size: 12.5px !important;
    line-height: 1.25 !important;
    padding: 6px 8px !important;
    vertical-align: middle !important;
}

.documents-modal-tables .card.bit-card .card-body .badge {
    font-size: 10px !important;
    padding: 0.25em 0.45em !important;
    font-weight: 600;
}

/* ---- Column widths -------------------------------------------------------- */
/* One shared grid for every table, so the sections line up with each other.
   Widths are keyed off the header class, not nth-child, because the tables do
   not all carry the same set of columns. */

.documents-modal-tables .doc-table {
    table-layout: fixed;
    width: 100%;
    margin-bottom: 0;
}

.documents-modal-tables .doc-table th.c-name    { width: auto; }
.documents-modal-tables .doc-table th.c-status  { width: 22%; }
.documents-modal-tables .doc-table th.c-date    { width: 12%; }
.documents-modal-tables .doc-table th.c-actions { width: 24%; }

/* ---- Cell contents -------------------------------------------------------- */

/* Full name always available via the title attribute — no server-side
   truncation, so the name uses whatever width the modal actually has. */
.documents-modal-tables .doc-name {
    display: block;
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sub-line: package, record id, created date, IP — everything that used to own
   a column of its own. */
.documents-modal-tables .doc-sub {
    display: block;
    font-size: 10.5px;
    line-height: 1.3;
    color: #94a3b8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.documents-modal-tables .doc-sub code {
    font-size: 10.5px;
    color: #94a3b8;
}

.documents-modal-tables .doc-date {
    font-size: 11.5px !important;
    white-space: nowrap;
}

/* Signing state and review state stack in one column instead of two. */
.documents-modal-tables .doc-status {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

/* The per-row record id sits inline on the sub-line, so it must not add height. */
.documents-modal-tables .doc-row-id code {
    font-size: 10px !important;
}

.documents-modal-tables .doc-row-id .btn {
    vertical-align: baseline;
}

/* ---- Action buttons ------------------------------------------------------- */

.documents-modal-tables .doc-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    justify-content: flex-end;
}

.documents-modal-tables .card.bit-card .card-body .doc-actions .btn {
    --bs-btn-padding-y: 0.15rem;
    --bs-btn-padding-x: 0.4rem;
    --bs-btn-font-size: 0.72rem;
    line-height: 1.2;
}

/* Disabled placeholder action buttons — grey instead of faded variant color */
.documents-modal-tables .card.bit-card .card-body .btn:disabled {
    background-color: #e2e8f0 !important;
    background-image: none !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    opacity: 1;
}
