/* Preserve the LegalZoo palette while letting content determine its height. */
img, iframe { max-width: 100%; }
.modal-title { min-width: 0; overflow-wrap: anywhere; }
.modal-body { min-width: 0; }
.modal-header, .modal-footer { gap: .75rem; }
.table-responsive { max-width: 100%; overflow-x: auto; }
.card-main-cases .case-search { flex: 1 1 280px; min-width: 0; max-width: 420px; }
.card-main-cases > .card-header { gap: 1rem; }
.case-list-table { min-width: 1050px; }
.case-list-table td:nth-child(2) { min-width: 200px; }
.case-list-table td:nth-child(3) { min-width: 160px; }
.case-list-table td:nth-child(4) { min-width: 120px; }
.case-list-table td:nth-child(5) { min-width: 185px; }
.case-list-table .text-wrap { word-break: normal !important; overflow-wrap: anywhere; }
.today-summary { flex-wrap: wrap; gap: .75rem; }
@media (max-width: 1199.98px) {
    .card-main-cases .table-responsive { overflow: visible !important; }
    .case-list-table, #saved-cases-table { display: block; width: 100%; min-width: 0; }
    .case-list-table thead { display: none; }
    #saved-cases-table { padding: 12px; }
    #saved-cases-table tr:not(.lz-skeleton-tr) {
        display: flex !important; flex-direction: column !important;
        position: relative; width: 100%; gap: 12px !important; margin-bottom: 12px;
        padding: 16px; border: 1px solid var(--lz-line-strong, #dbe3ef);
        border-radius: 16px; background: white;
    }
    #saved-cases-table tr:not(.lz-skeleton-tr) td {
        display: block !important; width: 100% !important; min-width: 0;
        padding: 0 !important; border: 0 !important; text-align: left !important;
        box-shadow: none !important; background: transparent !important;
    }
    #saved-cases-table tr:not(.lz-skeleton-tr) td:first-child:not([colspan]) { display: none !important; }
    #saved-cases-table td:nth-child(2) .text-wrap { max-width: 100% !important; }
    #saved-cases-table td:nth-child(2) { padding-right: 0 !important; }
    #saved-cases-table td:nth-child(3)::before,
    #saved-cases-table td:nth-child(4)::before {
        display: block !important; font-size: .75rem; font-weight: 700; color: #64748b;
        margin-bottom: 4px;
    }
    #saved-cases-table td:nth-child(3)::before { content: 'NEXT HEARING' !important; }
    #saved-cases-table td:nth-child(4)::before { content: 'RECENT HEARING'; }
    #saved-cases-table td:nth-child(5) { overflow-wrap: anywhere; }
    #saved-cases-table td:nth-child(6) { position: static !important; z-index: auto; }
    #saved-cases-table td:nth-child(6) > .d-flex {
        display: flex !important; flex-wrap: wrap; justify-content: flex-start !important;
        gap: 8px !important;
    }
    #saved-cases-table td:nth-child(6) .d-flex .btn:not(.btn-delete-case) { display: inline-flex !important; }
    #saved-cases-table td:nth-child(6) > .d-flex > .btn { flex: 1 1 105px; justify-content: center; }
    #saved-cases-table td:nth-child(6) .dropdown { position: relative !important; }
    #saved-cases-table td:nth-child(6) .btn { min-height: 44px; }
    #saved-cases-table .btn-delete-case { min-width: 44px; }
    #saved-cases-table td:nth-child(2) button { min-width: 32px !important; min-height: 32px !important; }
}
@media (max-width: 767.98px) {
    .table-responsive:not(.card-main-cases .table-responsive) { overflow-x: auto !important; }
    .table:not(.case-list-table) thead { display: table-header-group; }
    #documentsModal thead { display: none; }
    .modal-dialog { margin: .5rem; max-width: calc(100% - 1rem); }
    .modal-content { max-height: calc(100dvh - 1rem); }
    .modal-body { overflow-y: auto; padding: 16px !important; }
    .modal-header { padding: 16px !important; flex-wrap: wrap; }
    .modal-header .btn-close { flex-shrink: 0; }
    .card-main-cases .case-search { flex-basis: 100%; max-width: 100%; }
    .navbar .container { gap: 8px; }
    input.form-control, select.form-select { font-size: 16px !important; }
    .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 399.98px) {
    .navbar-brand { font-size: 1.2rem !important; margin-right: 0; }
    .navbar .btn { padding-left: 10px !important; padding-right: 10px !important; }
    .container { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
