/*
    vendor以下のデザインは、外部CSSで上書き
*/
/* メインページのラッパー */
.wrapper{
    height: fit-content;
}

/* カードの見出し */
.card-header {
    color: slategray;
}
/* 閉じるボタンの押下範囲をヘッダー全体にする */
.card-header > .card-tools:has(button[data-card-widget="collapse"]){
    padding-right: 26px !important;
}
.card-header > .card-tools > *{
    position: relative;
    z-index: 1;
}
.card-header >  .card-tools > button[data-card-widget="collapse"]{
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    text-align: right;
    margin: 0;
    padding: 0;
    z-index: 0;
    transition: color 0.2s, background 0.2s;
}
.card-header >  .card-tools > button[data-card-widget="collapse"] > i{
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-size: 14px;
}
.card-header >  .card-tools > button[data-card-widget="collapse"]:hover{
    color: rgba(173, 181, 189, 0.6);
    background: rgba(255,255,255,0.4);
}

/* フォームのラベル */
.col-form-label{
    color: slategray;
    letter-spacing: 2px;
    font-size: 0.8rem !important;
}

/* ツールチップ ※この後読み込まれるadminlte.min.cssによる上書き回避のためbody配下で指定 */
body .tooltip-inner{
    display: none;
    position: absolute;
    max-width: none;
    z-index: 1;
    padding: 8px 12px;
    font-size: 0.8rem;
    text-align: left;
    background-color: rgba(0,0,0,0.8);
}

/* ファイルアップロードボタン */
/* ※btn bg-gradient-dark などのデザイン調整クラスとの併用前提 */
input[type="file"]{
    font-size: 0;
}
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    border: none;
    padding: 0;
    font-size: 1rem;
    font-weight: 400;
    color: inherit;
    background: none;
    cursor: pointer;
}

/* 管理コード */
/* ヘッダーの管理コードプルダウンは専用デザインとする */
#customClientCode {
    border-radius: 30px;
    font-size: 16px;
    outline: none;
}

.custom-client-code {
    position: relative;
    cursor: pointer;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
}

/* ラベルのスタイル調整 */
.custom-client-code .client-code-label {
    margin: 0;
    cursor: pointer;
}

/* ボタンのスタイル調整 */
.custom-client-code .client-code-toggle {
    min-width: 150px;
    border: none;
    padding: 0.25rem 30px 0.25rem 0.5rem;
    background-color: transparent;
    border-radius: 0;
    position: relative;
    text-align: left;
    color: #708090;
}

/* ドロップダウンアイコン */
.custom-client-code .client-code-toggle::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #708090;
    border-bottom: 2px solid #708090;
    transform: translateY(-70%) rotate(45deg);
}

/* メニューのデザイン */
.custom-client-code .client-code-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* メニューのアイテムのデザイン */
.custom-client-code .client-code-item {
    padding: 0.375rem 0.75rem;
    color: #708090;
    text-decoration: none;
    display: block;
    list-style: none;
}

/* メニューのアイテムのホバー時のデザイン */
.custom-client-code .client-code-item:hover,
.custom-client-code .client-code-item:focus {
    background-color: #007bff;
    color: #fff;
}

/* カスタムDataTables：表示件数（length select）のサイズ・間隔調整 */
/* セレクトをフォームコントロール大サイズに近づけ、横幅を広げる */
.dataTables_length select {
    min-width: 80px;      /* 必要に応じて調整 */
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    height: calc(1.5em + 0.75rem + 2px); /* Bootstrap form-control の高さに合わせる */
    margin-left: 0.5rem; /* ラベルとプルダウンの間隔 */
}

/* 表示件数ラベルの色を検索結果と合わせる（グレー系統） */
.dataTables_length label {
    color: #6c757d; /* text-mutedと同じ色 */
    margin-bottom: 0;
}

/* ページネーションの余白リセット・垂直方向中央揃え */
.dataTables_paginate {
    margin: 0;
}

/* DataTablesテーブルのヘッダー調整：折り返し防止と文字サイズ自動調整 */
.dataTable thead th {
    white-space: nowrap;
    font-size: 0.95rem;
    padding: 0.6rem 0.4rem;
    min-width: fit-content;
    line-height: 1.3;
}

/* カラム数が多い場合はさらに文字を小さく */
.dataTable thead th:nth-child(n+8) {
    font-size: 0.85rem;
}

/* ソート可能なヘッダーの右パディングを調整してソートアイコンとの間隔を詰める */
.dataTable thead th.sorting,
.dataTable thead th.sorting_asc,
.dataTable thead th.sorting_desc {
    padding-right: 2.0rem !important;
}

/* テーブル全体の幅とスクロール制御 */
.dataTable {
    width: 100% !important;
    table-layout: auto;
}

/* DataTablesのテーブルボディのセル調整 */
.dataTable tbody td {
    font-size: 0.95rem;
    padding: 0.6rem 0.4rem;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
    max-width: 200px;
}

/* 操作ボタンのサイズ調整 */
.dataTable tbody .btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    min-width: 55px;
}

/* テーブルラッパーのオーバーフロー制御 */
.dataTables_wrapper {
    overflow-x: auto;
    width: 100%;
}

/* DataTable処理中のボタン無効化スタイル */
/* ボタン内のdisabled等の構造は変わらず、見た目とクリックを無効化する*/
.processing-disabled .btn {
    pointer-events: none !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* 処理中のテーブル全体の視覚的フィードバック */
.processing-disabled {
    position: relative;
}

.processing-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    z-index: 1;
    pointer-events: none;
}
