.search_header_area {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.pager_area {
    margin-right: auto
}

.table-wrapper {
    margin-top: 1em;
}
.table-wrapper table.ui.table th, .table-wrapper table.ui.table td {
    white-space: nowrap;
}

.condition_header {
    margin-bottom: 7px;
}

#searchresults_thumbnail {
    overflow-x: scroll;
    margin-top: 1em;
}

.main.container {
    padding: 2em 0em 0em;
}

.text-wrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 顧客検索：スマホで横スクロール・表の崩れを防ぐ（他画面の search.css 共有のためクラスで限定） */
@media (max-width: 768px) {
    .customer_search_page {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .customer_search_page .ui.main.container {
        width: 100% !important;
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        box-sizing: border-box;
    }

    .customer_search_page #search_wrap .ui.two.column.grid {
        flex-direction: column;
    }

    .customer_search_page #search_wrap .ui.two.column.grid > .column {
        width: 100% !important;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .customer_search_page #search_wrap .field.inline {
        display: block;
    }

    .customer_search_page #search_wrap .field.inline label {
        display: block;
        margin-bottom: 0.35em;
    }

    .customer_search_page #search_wrap .field.inline input[type="text"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .customer_search_page .search_header_area {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .customer_search_page .pager_area {
        margin-right: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .customer_search_page .pager_area .ui.buttons {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }

    /* 表は .unstackable で列を維持。狭い画面では横スクロールで右端まで閲覧可能にする */
    .customer_search_page .search_result_area {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    .customer_search_page .search_result_table.ui.table {
        table-layout: fixed;
        width: 820px;
        min-width: 820px;
        max-width: none;
        font-size: 0.78rem;
        margin-left: 0;
        margin-right: 0;
    }

    .customer_search_page .search_result_table.ui.table[class*="single line"] {
        white-space: normal !important;
    }

    .customer_search_page .search_result_table.ui.table thead th,
    .customer_search_page .search_result_table.ui.table tbody td {
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: anywhere;
        vertical-align: top;
    }

    .customer_search_page .search_result_table.ui.table td.center {
        text-align: center;
    }
}

/* 業務検索・業務承認一覧：顧客検索と同じ 768px（クラスで限定） */
@media (max-width: 768px) {
    .todo_search_page,
    .approval_page {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .todo_search_page .ui.main.container,
    .approval_page .ui.main.container {
        width: 100% !important;
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        box-sizing: border-box;
    }

    .todo_search_page #search_wrap .ui.two.column.grid,
    .todo_search_page #search_wrap .ui.three.column.grid,
    .todo_search_page #search_wrap .ui.one.column.grid {
        flex-direction: column;
    }

    .todo_search_page #search_wrap .ui.two.column.grid > .column,
    .todo_search_page #search_wrap .ui.three.column.grid > .column,
    .todo_search_page #search_wrap .ui.one.column.grid > .column {
        width: 100% !important;
        padding-top: 0.35rem;
        padding-bottom: 0.35rem;
    }

    .todo_search_page #search_wrap .field.inline {
        display: block;
    }

    .todo_search_page #search_wrap .field.inline label {
        display: block;
        margin-bottom: 0.35em;
    }

    .todo_search_page #search_wrap .field.inline input,
    .todo_search_page #search_wrap .field.inline select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .todo_search_page .search_header_area {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .todo_search_page .pager_area {
        margin-right: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .todo_search_page .pager_area .ui.buttons {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }

    .todo_search_page .search_result_area,
    .approval_page .search_result_area {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    .todo_search_page .search_result_table.ui.table,
    .approval_page .search_result_table.ui.table {
        table-layout: fixed;
        width: 720px;
        min-width: 720px;
        max-width: none;
        font-size: 0.78rem;
        margin-left: 0;
        margin-right: 0;
    }

    .todo_search_page .search_result_table.ui.table[class*="single line"],
    .approval_page .search_result_table.ui.table[class*="single line"] {
        white-space: normal !important;
    }

    .todo_search_page .search_result_table.ui.table thead th,
    .todo_search_page .search_result_table.ui.table tbody td,
    .approval_page .search_result_table.ui.table thead th,
    .approval_page .search_result_table.ui.table tbody td {
        white-space: normal !important;
        word-break: break-word;
        overflow-wrap: anywhere;
        vertical-align: top;
    }

    .todo_search_page .search_result_table.ui.table td.center,
    .approval_page .search_result_table.ui.table td.center {
        text-align: center;
    }
}