body {
  margin: 0;
  /*font-family: sans-serif;*/
  font-family: "M PLUS 1 Code", monospace;
}

button {
    background-color: rgba(59, 130, 246, 1);
    color: #ffffff;
    border-radius: 5px;
    border: 1px;
    border-color: rgb(107, 114, 128);
    padding: 5px 5px;
    cursor: pointer;
}

button:hover {
    background-color: rgba(59, 130, 246, 0.7);
}



select, textarea {
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
margin: 0px;
}

input[type="text"] {
            flex: 1;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
margin: 0px;
}

#searchForm {
padding: 0px;
}

form select, form button, form input {
  height: 36px;
  font-size: 16px;
  padding: 0 12px;
  box-sizing: border-box;
}

.container {
  display: flex;
  height: 100vh;
}
.sidebar {
  display: flex;
  flex-direction: column;
  width: 350px;
  border-right: 1px solid #ccc;
  overflow-y: auto;
  padding: 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
}
.main {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  height: 100vh;
  box-sizing: border-box;
}
#uploadArea {
  margin-top: 20px;
  border: 2px dashed #999;
  padding: 20px;
  text-align: center;
  background: #f9f9f9;
  height: 220px;
}

.folder .name {
  display: inline-block;
  max-width: 280px;   /*必要に応じて調整 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.sidebar .folder > .toggle {
  display: inline-block;
  width: 18px;
  vertical-align: middle;
  cursor: pointer;
  transition: transform 0.2s;
}

.sidebar .folder.expanded > .toggle {
  transform: rotate(90deg);
}

.sidebar .folder > .folder-icon, #selected-folder .folder-icon {
  vertical-align: middle;
  margin-right: 4px;
  color: #ffb300; /* Material Designの黄色っぽい色 */
}

.sidebar li {
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}

.sidebar .folder > ul {
  display: none;
  margin-left: 24px; /* アイコン分スペース空ける */
}

.sidebar .folder.expanded > ul {
  display: block;
}

.sidebar ul {
  list-style: none;  /* ここでリストマーカーを消す */
  padding-left: 0;
  margin: 0;
}

.sidebar li.selected > .name {
  background-color: #3f51b5;  /* 好きな強調色 */
  color: white;
  border-radius: 4px;
  padding: 2px 6px;
  user-select: none;
}

#folderTree {
  flex: 1;
  overflow-y: auto; /* フォルダツリーのみスクロール可 */
}


/*ローダー*/
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /*pointer-events: all;*/
}


.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

/* アニメーション */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


#uploadForm {
  position: fixed;
  bottom: 0;
  left: 50%;
  /*width: 100%;*/
  transform: translateX(-50%);
  background: #ffffff;
  border-top: 1px solid #ccc;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  /*box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);*/
  z-index: 10000; /* プレビューなど他の要素より前面に */
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 90%;
}


#statusModal {
  display: none;
  position: fixed;
  top: 50%;             /* 縦方向中央 */
  left: 50%;            /* 横方向中央 */
  transform: translate(-50%, -50%); /* 中央に完全配置 */
  
  background: white;
  border: 1px solid #ccc;
  padding: 20px;
  z-index: 9999;
  width: 300px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  
  /* 追加で中身も中央揃え */
  text-align: center;   /* テキストの横方向中央 */
  
  /* 縦方向の中央揃えが必要ならflexboxも使えます */
  display: flex;
  flex-direction: column;
  justify-content: center; /* 縦方向中央 */
  align-items: center;     /* 横方向中央 */
  gap: 15px;               /* ボタンとの隙間 */
  min-height: 150px;       /* 高さ調整 */
}

/*ページネーション*/
.pagination {
  margin-top: 15px;
  text-align: center;
  font-family: Arial, sans-serif;
  user-select: none;
}

.pagination a,
.pagination strong,
.pagination span {
  display: inline-block;
  margin: 0 4px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pagination a {
  background-color: #f0f0f0;
  color: #007bff;
  border: 1px solid #ddd;
}

.pagination a:hover {
  background-color: #007bff;
  color: white;
}

.pagination strong {
  background-color: #007bff;
  color: white;
  border: 1px solid #007bff;
  cursor: default;
}

.pagination span {
  color: #999999;
  border: 1px solid #ddd;
  background-color: #fafafa;
  cursor: default;
}

.pagination-container {
  text-align: center;    /* 中央揃え */
  margin-bottom: 15px;   /* テーブルとの間隔（下側余白） */
  user-select: none;
  font-family: Arial, sans-serif;
}
.table-wrapper {
  max-width: 1000px;
  margin: 0 auto;  /* 中央寄せ */
}


.control-row {
    border: none !important;
}

.control-row td {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
}

/* テーブル全体のスタイル調整 */
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 1000px;
    font-family: Arial, sans-serif;
}

/* 通常の行のボーダーは維持 */
table tr:not(.control-row) {
    border: 1px solid #ccc;
}

table td:not(.control-row td) {
    border: 1px solid #ccc;
    padding: 5px;
}

table th {
    border: 1px solid #ccc;
    padding: 5px;
    background-color: #f5f5f5;
}

.icon {
  width: 80px;
  height: 80px;
  margin-right: 3px;
}

.title {
    display: flex;
    align-items: center;

}

.update-btn:active {
    transform: translateY(2px); /* 少し下に動かす */
    /*box-shadow: 0 2px #2980b9;*/
}


#imagenInput table {
    border-collapse: collapse;
    border-spacing: 0;
    border: none;
}
#imagenInput td, #imagenInput th, #imagenInput tr {
    border: none;
    padding: 10px 0px;
}

#imagenInput td:first-child {
    width: 1%;         /* 最小幅を文字に合わせる */
    white-space: nowrap; /* 改行させずに横幅を自動調整 */
}

#imagenInput td:last-child {
    width: auto;       /* 残りのスペースを使用 */
    padding-left: 30px;
}

