body:has(.dialog_wrap) {
    overflow: hidden;
}

#filebox-block {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.4);
}


#filebox-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    background-color: rgba(0, 0, 0, 0.4);
}

#file-box input,
#file-box textarea {
    padding: 3px;
    border: 1px solid #cccccc;
}

#file-box select {
    border: 1px solid #cccccc;
    border-radius: 2px;
}

#file-box button:disabled {
    border-color: #aaaaaa;
    background-color: #cccccc;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
    cursor: default;
}

/* ヘッダ部 */
#archive-button {
    position: fixed;
    top: 0;
    right: 0;
    margin: 8px 10px;
    width: 300px;
    height: 30px;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
}

.filebox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0;
    height: 50px;
    font-size: 0.78em;
    color: steelblue;
    background-image: url(images/filebox_toolbar.png);
    background-repeat: repeat-x;
    background-position: 100% 0;
}

.filebox-header div:first-child {
    display: flex;
    align-items: center;
}

#filebox-upload {
    width: 200px;
    height: 30px;
}

.base-button {
    border: 1px solid #1389FF;
    border-radius: 3px;
    background-color: #71b8ff;
    color: #ffffff;
    font-weight: 800;
    margin: auto 5px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.base-button:hover,
.base-button:active {
    color: #ffffff;
    background-color: #1389ff;
}

.base-button-cancel {
    border: 1px solid #ffffff;
    border-radius: 5px;
    color: #458dc4;
    background-color: #b5daff;
    padding: 2px 5px;
    margin-left: 10px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.base-button-cancel:hover,
.base-button-cancel:active {
    color: #ffffff;
    background-color: #1389ff;
}

#filebox-loading-group {
    width: 15px;
}

#filebox-group-name {
    margin-left: 5px;
    min-width: 340px;
    max-width: 340px;
    line-height: 1.1;
}

#filebox-header-tool {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 5px;
}

#filebox-header-tool select {
    height: 20px;
    font-size: 0.8rem;
}

#filebox-view-type {
    margin: 0 20px 0 5px;
}

#filebox-view-size {
    margin: 0 5px;
}


#filebox-file-type {
    margin-left: 5px;
    margin-top: -1px;
    ;
}

#filebox-search {
    width: 150px;
    height: 13px;
    font-size: 0.8rem;
    margin-top: -1px;
}

#filebox-header-tool button {
    height: 20px;
    font-size: 0.7rem;
    margin: 2px 0;
    padding: 0 10px;
    cursor: pointer;
}

#filebox-header-tool button#filebox_search_button {
    margin-right: 10px;
}

/* グループ一覧 */
main {
    display: flex;
    font-size: 0.8rem;
}

#filebox-group-column {
    height: 505px;
    width: 250px;
    border-right: 1px solid #cccccc;
    padding-top: 5px;
}

#filebox-group-list {
    height: calc(100% - 23px);
    overflow-y: scroll;
    padding: 5px 0 0 0;
}

input#filebox-group-search-text {
    width: calc(100% - 50px);
    font-size: 0.8rem;
    padding: 0px 2px;
    margin-top: -2px;
}

#filebox-group-search {
    width: 40px;
    height: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    margin: 0;
}

#filebox-group-list ul {
    border-bottom: 1px solid #cccccc;
}

#filebox-group-list li {
    cursor: pointer;
    padding: 2px 3px 0px 20px;
    border: #d3e0f2 none 1px;
    vertical-align: middle;
    font-size: 0.7rem;
}


#filebox-group-list li:hover,
.selected-folder {
    background-color: #d4eeff;
    border: #d3e0f2 solid 1px;
}

#filebox-group-list li img {
    display: none;
}

#filebox-group-list .system-folder,
#filebox-group-list .my-folder {
    background-image: url("../images/icons/001_20.png");
    background-repeat: no-repeat;
    background-position: 3px 50%;
    background-size: 15px;
}

#filebox-group-list .group-folder {
    background-image: url("../images/icons/001_57.png");
    background-repeat: no-repeat;
    background-position: 3px 50%;
    background-size: 15px;
}

#filebox-group-list .sub-folder {
    background-image: url("../images/icons/001_xx.png");
    background-repeat: no-repeat;
    background-position: 15px 50%;
    background-size: 15px;
    padding-left: 30px;
}

#filebox-group-list .virtual-folder {
    background-image: url("../images/icons/001_x1.png");
    background-repeat: no-repeat;
    background-position: 15px 50%;
    background-size: 15px;
    padding-left: 30px;
}

#filebox-group-list .sub-folder img {
    vertical-align: middle;
    margin-left: 5px;
}

#filebox-group-list .trash-box {
    background-image: url("../images/icons/001_49.png");
    background-repeat: no-repeat;
    background-position: 3px 50%;
    background-size: 15px;
}

.filebox-drag-highlight {
    background-color: #d4eeff;
}

.filebox-drag-hover {
    background-color: #71b8ff;
}

/* ファイル一覧 */
#filebox-group-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 5px;
}

#filebox-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 25px;
    background-color: #71b8ff;
    padding: 10px;
}

#filebox-group-header>div:first-child {
    display: flex;
    align-items: center;
}

#filebox-group-header>div>label {
    margin-right: 30px;
}

#filebox-group-header button {
    border: 1px solid #ffffff;
    border-radius: 5px;
    color: #458dc4;
    background-color: #b5daff;
    padding: 2px 5px;
    margin-left: 10px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

#filebox-group-header div:nth-child(1) button {
    margin-right: 10px;
    margin-left: 0;
}

#filebox-group-header button:hover,
#filebox-group-header button:active {
    color: #ffffff;
    background-color: #1389ff;
}

#filebox-group-header button:first-child {
    margin-left: 0px;
}

#filebox-group-file-list {
    height: 100%;
    max-height: 410px;
    border: 1px solid #71b8ff;
    overflow-y: scroll;
}

/* Firefoxに:has()が使用できるまでの間 */
@supports not selector(:has(*)) {
    #filebox-group-file-list {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        align-content: flex-start;
    }

    #filebox-group-file-list.filebox-group-file-list {
        display: block;
    }
}


#filebox-group-file-list:has(.filebox-list-simple),
#filebox-group-file-list:has(.filebox-list-thumb) {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-content: flex-start;
}

/* 簡易リスト */
#filebox-group-file-list {
    padding: 5px;
}

#file-box .filebox-list-simple {
    width: 49.5%;

}

.filebox-group-file {
    border: 1px solid #cccccc;
    padding: 5px;
    font-size: 0.7rem;
}

.filebox-file-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 5px;
}

.filebox-file-title label {
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
}


.filebox-file-title div {
    min-width: 60px;
    font-size: 0.7rem;
    margin-left: 5px;
    text-align: right;
}

.filebox-list-trash .filebox-file-title div {
    min-width: 110px;
}

.filebox-file-title div a:first-child {
    margin-right: 5px;
}

.filebox-file-title div a:last-child {
    margin-left: 5px;
}

.filebox-file-content {
    display: flex;
    align-items: stretch;
    gap: 5px;
    justify-content: space-between;
}

.filebox-file-image {
    width: 100px;
    min-height: 70px;
    text-align: center;
}

.filebox-file-image img {
    max-width: 100px;
    max-height: 68px;
}

.filebox-file-summary {
    width: 170px;
    max-height: 60px;
    border: 1px solid #cccccc;
    padding: 5px;
    font-size: 0.6rem;
    overflow-y: auto;
}

.filebox-file-misc {
    font-size: 0.6rem;
    text-align: right;
    align-self: flex-end;
}

.filebox-file-misc select,
.filebox-file-misc-paste select {
    font-size: 0.6rem;
    width: 100%;
}

.filebox-file-misc-paste {
    width: 115px;
    font-size: 0.6rem;
    text-align: center;
    border: 1px solid #cccccc;
}

.filebox-file-misc-paste li {
    list-style-type: none;
}

.filebox-file-misc-paste .filebox-paste-title {
    background-color: #71b8ff;
    color: #ffffff;
}

.filebox-file-misc-paste li:not(.filebox-paste-title) {
    cursor: pointer;
}

.filebox-file-misc-paste li:not(.filebox-paste-title):hover {
    background-color: #c6e0fa;
}

/* リスト */

.filebox-list-table {
    display: flex;
}

.filebox-list-item-title div {
    text-align: center;
    background-color: #c6e0fa;
}

.filebox-list-table div {
    border: 1px solid #cccccc;
    padding: 2px 5px;
}

.filebox-file-title-table {
    flex-grow: 2;
}

.filebox-file-title-table label input {
    margin-right: 5px;
}

.filebox-file-owner-table {
    width: 200px;
}

.filebox-file-size-table {
    width: 100px;
    text-align: right;
}

.filebox-file-date-table {
    width: 150px;
}

/* サムネイル */
.filebox-list-thumb {
    position: relative;
    width: 165px;
    height: 165px;
    border: 1px solid #cccccc;
}

.filebox-file-image-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 165px;
    height: 165px;
}

.filebox-list-thumb .filebox-file-title {
    position: absolute;
    top: 10px;
    left: 10px;
}

.filebox-list-thumb input[type=checkbox] {
    position: absolute;
    z-index: 1;
    transform: scale(1.5);
    margin: 0;
}

.filebox-list-thumb .filebox-file-title span {
    display: none;
}

.filebox-list-thumb a {
    display: inline-block;
}

.filebox-list-thumb img {
    max-height: 150px;
    max-width: 150px;
}

#filebox-group-file-pageNation {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.filebox-dialog {
    display: none;
    position: fixed !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #cccccc;
    border-radius: 5px;
    background-color: #ffffff;
    box-shadow: 0px 10px 10px -6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.filebox-dialog .filebox-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 45px;
    padding: 0px 10px;
    border-bottom: 1px solid #cccccc;
    background-image: url(images/filebox_toolbar.png);
    background-repeat: repeat-x;
    background-position-y: -1px;
}

.filebox-dialog .filebox-dialog-header div {
    cursor: pointer;
}

/* アップロード */
#filebox-dialog-upload {
    width: 600px;
}

#filebox-dialog-upload-content {
    width: 100%;
    margin-top: 0;
    border: 0 none;
}

#filebox-dialog-upload-file {
    display: none;
}

#filebox-dialog-upload-area {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 80px;
    border: 1px solid #cccccc;
    border-radius: 3px 3px 0 0;
    padding: 5px;
    margin-right: 2px;
    cursor: pointer;
}

#filebox-dialog-upload-area.drag-over {
    background-color: #d4eeff;
}

#filebox-dialog-upload-file-list {
    max-height: 60px;
    overflow-y: auto;
    margin-right: 2px;
}

#filebox-dialog-upload-file-list ul {
    display: flex;
    flex-wrap: wrap;
}

#filebox-dialog-upload-file-list li {
    display: flex;
    justify-content: space-between;
    list-style-type: none;
    padding: 0 3px 0 5px;
    border: 1px solid #cccccc;
    min-width: 260px;
    max-width: 260px;
}

#filebox-dialog-upload-file-list li .upload-file-remove {
    width: 15px;
    height: 15px;
    background-color: rgb(255, 108, 108);
    color: #ffffff;
    border-radius: 3px;
    text-align: center;
    margin-top: 2px;
    font-size: 0.65rem;
    cursor: pointer;
}

/* 確認ダイアログ */
#filebox-dialog-confirm {
    width: 700px;
    height: 170px;
}

#filebox-dialog-confirm-message {
    display: flex;
    align-items: center;
    padding: 5px;
    height: 70px;
}

.filebox-dialog-buttons,
#filebox-dialog-confirm-buttons {
    display: flex;
    justify-content: center;
    padding: 5px;
    border-top: 1px solid #cccccc;
}

#filebox-dialog-confirm-yes,
#filebox-dialog-confirm-no {
    width: 100px;
    height: 30px;
}

.filebox-dialog-buttons button {
    width: 100px;
    height: 30px;
}

/* コピー・移動 */
#filebox-dialog-copy-move {
    width: 500px;
    height: 145px;
}

#filebox-dialog-copy-move .filebox-dialog-message {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 5px;
    height: 50px;
}

.filebox-dialog input,
.filebox-dialog textarea {
    width: 98%;
}

.filebox-dialog select {
    width: calc(100% - 2px);
    height: 25px;
}

#filebox-dialog-copy-button,
#filebox-dialog-move-button,
#filebox-dialog-cancel {
    width: 100px;
    height: 30px;
}

/* フォルダ作成 */
#filebox-dialog-make-dir {
    width: 500px;
    height: 252px;
}

/* フォルダ名変更 */
#filebox-dialog-rename {
    width: 500px;
    height: 175px;
}

#filebox-dialog-rename .filebox-dialog-message {
    height: 110px;
}

#filebox-dialog-rename .filebox-dialog-message {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 5px;
    height: 100px;
}

#filebox-dialog-rename .filebox-dialog-message div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

#filebox-dialog-rename button {
    width: 100px;
    height: 30px;
}

/* フォルダ削除 */
#filebox-dialog-delete-dir {
    width: 400px;
    height: 130px;
}

#filebox-dialog-delete-dir .filebox-dialog-message {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 5px;
    height: 30px;
}

#filebox-dialog-delete-dir button {
    width: 100px;
    height: 30px;
}

/* 一括処理ダイアログ */
.filebox-dialog-bulk {
    width: 500px;
    height: 170px;
}

#filebox-dialog-bulk-copy-move {
    height: 245px;
}

#filebox-dialog-bulk-copy-move #filebox-dialog-bulk-message {
    height: 110px;
}

.filebox-dialog-bulk-message {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 5px;
    height: 70px;
}

.filebox-dialog-bulk-buttons {
    display: flex;
    justify-content: center;
    padding: 5px;
    border-top: 1px solid #cccccc;
}

#filebox-dialog-bulk-delete-button,
#filebox-dialog-bulk-copy-button,
#filebox-dialog-bulk-move-button,
#filebox-dialog-bulk-pmt-button,
.filebox-dialog-bulk-cancel {
    width: 100px;
    height: 30px;
}

/* 一括貼り付け */
#filebox-dialog-bulk-paste {
    height: 215px;
}

#filebox-dialog-bulk-paste .filebox-dialog-bulk-content {
    height: 135px;
}

#filebox-dialog-bulk-paste {
    height: 220px;
}

#filebox-dialog-bulk-paste #filebox-dialog-bulk-paste li {
    list-style-type: none;
}

#filebox-dialog-bulk-paste .filebox-bulk-paste-title {
    margin-bottom: 0;
}

#filebox-dialog-bulk-paste li:not(.filebox-bulk-paste-title) {
    cursor: pointer;
    padding-left: 10px;
}

#filebox-dialog-bulk-paste li:not(.filebox-bulk-paste-title):hover {
    background-color: #c6e0fa;
}

#filebox-dialog-bulk-paste ul {
    display: none;
    height: 140px;
}

/* 情報変更ダイアログ */
#filebox-dialog-modify {
    width: 700px;
}

#filebox-dialog-modify-content {
    width: calc(100% - 2px);
    margin-top: 0;
    border: 0 none;
}

#filebox-dialog-modify-file-upload-warp {
    display: flex;
    align-items: center;
    height: 100px;
    padding: 5px 0px;
}

#filebox-dialog-modify-file-upload-warp img {
    max-height: 90px;
    margin-right: 10px;
    border-radius: 5px;
}

#filebox-dialog-modify-file-upload-area {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100px;
    border: 1px solid #cccccc;
    border-radius: 3px;
    padding: 5px;
    cursor: pointer;
}

#filebox-dialog-modify-file-upload-file-name {
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    margin-right: 5px;
}

#filebox-dialog-modify-file-upload-area.drag-over {
    background-color: #d4eeff;
}

#filebox-dialog-modify-file {
    display: none;
}
