/* オーバーレイ表示 */
.circular-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.overlay-content {
    background: #fff;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    border-radius: 5px;
    position: relative;
    width: 800px; /* 適切な幅 */
}
.overlay-content h3 {
    margin-top: 0;
}
.close-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f28c38 !important;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
}
.details-row {
    background: #f9f9f9;
}
.circular-details {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.toggle-details {
    font-size: 10px;
    padding: 5px 10px;
}
.circular-details .circular-table {
    margin: 0;
}
.overlay-content table {
    width: 100%;
    border-collapse: collapse;
}
.overlay-content th,
.overlay-content td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

/* 表編集ページのテーブルスタイル */
.circular-row-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.circular-row-table th,
.circular-row-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    vertical-align: middle;
}
.circular-row-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}
.circular-row-table select,
.circular-row-table input[type="file"] {
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
}
.circular-row-table .existing-pdf {
    margin-bottom: 5px;
}
.circular-row-table .existing-pdf a {
    margin-right: 10px;
}

/* ★★★★★ START: ここからが今回の修正箇所です ★★★★★ */
/* ドラッグ＆ドロップエリアの基本スタイル */
.drop-area {
    border: 2px dashed #ccc;
    padding: 10px;
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 5px;
    font-size: 12px;
    color: #666;
    transition: background-color 0.2s, border-color 0.2s;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ドラッグオーバー時のハイライトスタイル (目印) */
.drop-area.dragover {
    border-color: #007bff;
    background-color: #e9f5ff; /* 薄い青色の背景 */
}
/* ★★★★★ END: 修正はここまでです ★★★★★ */


/* ボタンスタイルの統一 */
.kanran-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    margin: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.kanran-button:hover {
    background-color: #0056b3;
}

/* 削除ボタンのスタイル（赤背景、白文字、太字） */
.circular-wrap .delete-button {
    padding: 10px 20px;
    background-color: #ff0000;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    margin: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.circular-wrap .delete-button:hover {
    background-color: #cc0000;
}

/* 小さいボタン */
.kanran-button-small {
    padding: 5px 10px;
    font-size: 12px;
    background-color: #007bff;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    margin: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.kanran-button-small:hover {
    background-color: #0056b3;
}

/* 小さい削除ボタン */
.delete-button-small {
    padding: 5px 10px;
    font-size: 12px;
    background-color: #ff0000;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    margin: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.delete-button-small:hover {
    background-color: #cc0000;
}

/* ページネーション */
.pagination-wrap {
    text-align: center;
    margin: 20px 0;
}
.pagination-wrap .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
}
.pagination-wrap .page-numbers.current,
.pagination-wrap .page-numbers:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* AJAXローディング */
.circular-list-loading {
    opacity: 0.5;
    position: relative;
}
.circular-list-loading::after {
    content: '読み込み中...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
}