/* Tips Table Viewer — base layout */

td, th {
    word-wrap: break-word;
    white-space: normal;
    max-width: 300px;
}

tfoot input {
    width: 100%;
    font-size: 0.875rem;
}

tfoot {
    display: table-header-group;
}

.toast-container {
    z-index: 1080;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner-lg {
    width: 4rem;
    height: 4rem;
    border-width: .4em;
}

.tips-view-select {
    width: auto;
    min-width: 160px;
}

/* Phones and small tablets */
@media (max-width: 767.98px) {
    .tips-toolbar {
        width: 100%;
        margin-left: 0 !important;
    }
    .tips-toolbar > * {
        margin-left: 0 !important;
    }
    .tips-toolbar .btn,
    .tips-toolbar .dropdown {
        flex: 1 1 auto;
    }
    .tips-toolbar .dropdown .btn {
        width: 100%;
    }
    .tips-toolbar .tips-view-select {
        width: 100%;
        min-width: 0;
    }
    td, th {
        max-width: none;
    }
}

/* Narrow phones: full-width search and stacked action buttons */
@media (max-width: 575.98px) {
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
    }
    .actions-column .btn {
        width: 100%;
    }
}
