/* ========================================
   Transaction History Module Styles
   Theme-aware styling for the Transaction History grid (user dropdown ->
   Transaction History). Scoped CSS bundles are unreliable in production,
   so feature-critical styles for this module live here (WI 5348).
   ======================================== */

@layer theme-components {

    /* ========================================
       Description column: compact-by-default with expand/collapse (WI 5348)
       Long entries (e.g. an ACORD form prefill that lists every field) start
       visually clamped to a couple of lines; the full text always stays in
       the DOM so no information is lost, and a "Show more" button reveals it.
       ======================================== */

    .th-description-cell {
        max-width: 28rem;
        vertical-align: top;
    }

    .th-description-text {
        display: block;
        white-space: pre-line;
        word-break: break-word;
    }

    .th-description-text.th-description-clamped {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .th-description-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        margin-top: 0.25rem;
        padding: 0.1rem 0.4rem;
        background: none;
        border: none;
        border-radius: var(--bs-border-radius);
        color: var(--primary-color);
        font-size: 0.8rem;
        font-weight: 500;
        cursor: pointer;
    }

    .th-description-toggle:hover,
    .th-description-toggle:focus-visible {
        color: var(--primary-dark);
        background-color: var(--bg-tertiary);
        text-decoration: underline;
    }

    .th-description-toggle:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* ========================================
   Mobile width overrides
   ======================================== */
@media (max-width: 767.98px) {
    .th-description-cell {
        max-width: none;
    }
}
