/* Builelib stylesheet layer: 00-base.css */

@charset "UTF-8";

/* 共通の設定 */

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  padding: 10;
  font-family: "Noto Sans JP", sans-serif;
  background-color: #ffffff;
}

nav {
  margin: 30px 10px 0 auto;
}

h2 {
  font-size: 20px;
  margin: 0px 20px 5px 20px;
}

h3 {
  font-size: 16px;
  margin: 0px 20px 0px 20px;
}

h4 {
  font-size: 16px;
}

p {
  margin: 0px 20px 0px 30px;
  padding: 2px;
    font-size: 14px;
}

ul {
  margin: 0px 20px 0px 30px;
  padding: 2px;
}
li {
  font-size: 14px;
  margin: 0px 20px 0px 30px;
  padding: 2px;
}

table {
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

#result-zone {
  display: none;
}

/* ヘッダーの設定 */

header {
  width: 100%;
  height: 70px;
  padding: 10px 0px;
  margin: 0 0;
  text-align: left;
  color: #ffffff;
  background-image: linear-gradient(#3c4eb2, #4354b0);
  position: fixed;
  top: 0;
  display: flex;
  align-items: center;
  z-index: 99;
}

h1.header {
  font-family: "Source Sans Pro", sans-serif;
  font-size: 26px;
  white-space: nowrap;
}
h3.header {
  font-size: 16px;
  margin: 12px 0 0 0;
}
a.header {
  text-decoration: none;
  color: #ffffff;
}
ul.header {
  display: flex;
  list-style: none;
  margin: 0;
}
li.header {
  margin: 0 0 0 15px;
  font-size: 14px;
}

/* フッターの設定 */

.footerFixed {
  min-height: 100vh;
  position: relative; /*←相対位置*/
  padding-bottom: 10px; /*←footerの高さ*/
  box-sizing: border-box; /*←全て含めてmin-height:100vhに*/
}

footer {
  width: 100%;
  text-align: center;
  padding: 10px 0;
  background-image: linear-gradient(#3c4eb2, #4354b0);
  position: absolute; /*←絶対位置*/
  bottom: 0; /*下に固定*/
}

p.footer {
  color: #fff;
}

a.footer:link,
a.footer:visited,
a.footer:hover,
a.footer:active {
  color: #fff;
  text-decoration: none;
}

/* ドラッグ＆ドロップゾーン */

.dropZone {
  margin-top: 5px;
  margin-bottom: 30px;
  margin-left: 30px;
  margin-right: 30px;
  border: 2px dotted #1a66ff; /* 青の点線 */
  border-radius: 10px;
  padding: 0.5em 1em;
  text-align: center;
  background-color: #ffffff;
  color: #000000;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
#drop-zone.dropZone.tile {
  border: 2px dotted #1a66ff !important; /* タイルの枠より優先 */
}

#drop-zone.highlight {
  border-color: #4d8dff;
  background-color: #eef4ff;
}
#drop-zone:hover {
  border-color: #4d8dff;
  background-color: #eef4ff;
}

.box {
  padding: 0.5em 1em;
  margin-top: 5px;
  margin-bottom: 5px;
  margin-left: 30px;
  margin-right: 30px;
  color: #000000; /*文字色*/
  background: #fff;
  border: 1px dashed #898989;
  border-radius: 10px; /*角の丸み*/
  text-align: center;
}

/* index.php layout tweaks: align top-row and result area edges */
.container .top-row {
  gap: 12px;
  align-items: stretch;
}
.container .top-row > .tile {
  min-height: 260px;
  height: auto;
}
body #drop-zone {
  flex: 0 0 25%;
  width: auto;
  margin: 0;
}
body #history-zone {
  flex: 1 1 0;
  width: auto;
  margin: 0;
  padding-top: 0;
}
body #history-zone h3,
body #result-zone h3 {
  margin-top: 10px;
  margin-bottom: 18px;
}
body #result-zone {
  margin-left: 0;
}

table.result-table {
  text-align: center;
  border-collapse: collapse;
  border: 2px solid #555;
  font-size: 14px;
  background-color: #fff;
}
table.result-table th,
table.result-table td {
  padding: 10px 20px;
  border-top: 1px solid #555;
  border-left: 1px solid #555;
  border-right: 1px solid #555;
}
table.result-table th {
  background-color: #eee;
}

table.error-message {
  margin-top: 10px;
  width: 98%;
  margin-left: auto;
  border-collapse: collapse;
  border: 2px solid rgb(255, 0, 0);
  font-size: 14px;
  background-color: #facbd3b4;
}
table.error-message th,
table.error-message td {
  padding: 8px 8px;
  border-top: 0px solid #555;
  border-left: 0px solid #555;
  border-right: 0px solid #555;
}
table.error-message th {
  background-color: #eee;
}


.chartdiv {
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  height: 220px; /* match chart height to avoid extra gap */
  margin-bottom: 0;
}

/* ナビゲーションメニューの設定 */

.sp-nav {
  display: none;
}

@media screen and (max-width: 1000px) {
  nav.pc-nav {
    display: none;
  }

  li.header {
    font-size: 26px;
    list-style: none;
  }
  li.close {
    list-style: none;
  }

  #hamburger {
    position: relative;
    display: block;
    width: 30px;
    height: 25px;
    margin: 0 0 0 auto;
  }

  #hamburger span {
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transform: translateY(-50%);
  }
  #hamburger::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
  }
  #hamburger::after {
    content: "";
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70%;
    height: 2px;
    background-color: #fff;
  }

  .sp-nav {
    z-index: 1;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: block;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    transition: all 0.2s ease-in-out;
    opacity: 0;
    transform: translateY(-100%);
  }

  .sp-nav ul {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
  }
  .sp-nav li {
    margin: 0;
    padding: 0;
  }
  .sp-nav li span {
    font-size: 24px;
    color: #fff;
  }
  .sp-nav li a,
  .sp-nav li span {
    display: block;
    padding: 20px 0;
  }

  /*基準となるli要素*/
  .sp-nav .close {
    position: relative;
    padding-left: 20px;
  }
  /*バツ印線1*/
  .sp-nav .close::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 16px;
    height: 1px;
    background: #fff;
    transform: rotate(45deg);
  }
  /*バツ印線2*/
  .sp-nav .close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    display: block;
    width: 16px;
    height: 1px;
    background: #fff;
    transform: rotate(-45deg);
  }

  .toggle {
    transform: translateY(0);
    opacity: 1;
  }
}

@media screen and (max-width: 1050px) {
  h3.header {
    display: none;
  }
}

/* 結果表示用のタブの設定 */

/*タブ切り替え全体のスタイル*/
.tabs {
  margin-top: 50px;
  padding-bottom: 40px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  width: 95%;
  margin: 0 auto;
}

/*タブのスタイル*/
.tab_item {
  width: calc(100% / 8);
  height: 50px;
  border-bottom: 3px solid #4638ff;
  background-color: #d9d9d9;
  line-height: 50px;
  font-size: 15px;
  text-align: center;
  color: #565656;
  display: block;
  float: left;
  text-align: center;
  font-weight: bold;
  transition: all 0.2s ease;
}
.tab_item:hover {
  opacity: 0.75;
}

/*ラジオボタンを全て消す*/
input[name="tab_item"] {
  display: none;
}

/*タブ切り替えの中身のスタイル*/
.tab_content {
  display: none;
  padding: 40px 40px 0;
  clear: both;
  overflow: hidden;
}

/*選択されているタブのコンテンツのみを表示*/
#all:checked ~ #all_content,
#PAL:checked ~ #PAL_content,
#AC:checked ~ #AC_content,
#V:checked ~ #V_content,
#L:checked ~ #L_content,
#HW:checked ~ #HW_content,
#EV:checked ~ #EV_content,
#PV:checked ~ #PV_content,
#CGS:checked ~ #CGS_content {
  display: block;
}

/*選択されているタブのスタイルを変える*/
.tabs input:checked + .tab_item {
  background-color: #4638ff;
  color: #fff;
}

/* AC subtabs */
.ac-subtabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.ac-subtab-button,
.v-subtab-button {
  padding: 10px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f7f8fa;
  color: #344054;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ac-subtab-button:hover,
.v-subtab-button:hover {
  background: #eef2f7;
  border-color: #c0c6d0;
}
.ac-subtab-button.active,
.v-subtab-button.active {
  background: #2f5bea;
  color: #fff;
  border-color: #2f5bea;
  box-shadow: 0 4px 12px rgba(47, 91, 234, 0.25);
}
.l-subtab-button {
  padding: 10px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f7f8fa;
  color: #344054;
  cursor: pointer;
  transition: all 0.2s ease;
}
.l-subtab-button:hover {
  background: #eef2f7;
  border-color: #c0c6d0;
}
.l-subtab-button.active {
  background: #2f5bea;
  color: #fff;
  border-color: #2f5bea;
  box-shadow: 0 4px 12px rgba(47, 91, 234, 0.25);
}
.hw-subtab-button {
  padding: 10px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f7f8fa;
  color: #344054;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hw-subtab-button:hover {
  background: #eef2f7;
  border-color: #c0c6d0;
}
.hw-subtab-button.active {
  background: #2f5bea;
  color: #fff;
  border-color: #2f5bea;
  box-shadow: 0 4px 12px rgba(47, 91, 234, 0.25);
}
.ev-subtab-button {
  padding: 10px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f7f8fa;
  color: #344054;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ev-subtab-button:hover {
  background: #eef2f7;
  border-color: #c0c6d0;
}
.ev-subtab-button.active {
  background: #2f5bea;
  color: #fff;
  border-color: #2f5bea;
  box-shadow: 0 4px 12px rgba(47, 91, 234, 0.25);
}
.pv-subtab-button {
  padding: 10px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f7f8fa;
  color: #344054;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pv-subtab-button:hover {
  background: #eef2f7;
  border-color: #c0c6d0;
}
.pv-subtab-button.active {
  background: #2f5bea;
  color: #fff;
  border-color: #2f5bea;
  box-shadow: 0 4px 12px rgba(47, 91, 234, 0.25);
}
.cgs-subtab-button {
  padding: 10px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #f7f8fa;
  color: #344054;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cgs-subtab-button:hover {
  background: #eef2f7;
  border-color: #c0c6d0;
}
.cgs-subtab-button.active {
  background: #2f5bea;
  color: #fff;
  border-color: #2f5bea;
  box-shadow: 0 4px 12px rgba(47, 91, 234, 0.25);
}

/* Tables: horizontal scroll + sticky header */
.table-scroll {
  overflow-x: hidden; /* avoid horizontal scrollbar */
  overflow-y: auto;
  position: relative;
  width: 100%;
  max-width: 100%;
}
.table-scroll table {
  border-collapse: collapse;
  width: 100%;
  min-width: 0;
  table-layout: fixed; /* squeeze to container */
}
.table-scroll thead th {
  position: sticky;
  top: 0;
  background: #f7f8fa;
  z-index: 2;
}

/* prevent wrapping on the first column (name column) */
.result-table th:first-child,
.result-table td:first-child {
  white-space: nowrap;
}
.ac-detail-table th:first-child,
.ac-detail-table td:first-child {
  width: 160px; /* widen name column for AC detail tables */
}
.result-table th:not(:first-child),
.result-table td:not(:first-child) {
  white-space: normal;
  word-break: break-word; /* wrap long text to stay inside */
}
.ac-load-band-table th,
.ac-load-band-table td {
  font-size: 12px;
  padding: 6px 8px;
}

/* hover highlights for all result tables */
.result-table tr:hover td,
.result-table tr:hover th {
  background: #e8edfb !important;
}
.result-table td.cell-hover,
.result-table th.cell-hover {
  background: #d9e4ff !important;
}
.result-table td.col-hover,
.result-table th.col-hover {
  background: #e3e9ff !important;
}
.result-table td,
.result-table th {
  transition: background 0.1s ease;
}

.csv-btn {
  margin: 6px 0;
  padding: 6px 12px;
  border: 1px solid #d0d5dd;
  background: #f7f8fa;
  border-radius: 6px;
  cursor: pointer;
  color: #344054;
  font-size: 13px;
}
.csv-btn:hover {
  background: #eef2f7;
  border-color: #c0c6d0;
}

.csv-actions {
  margin: 8px 0 14px;
  display: flex;
  justify-content: flex-end;
}

.csv-actions .csv-btn {
  margin: 0;
}
.tablesorter-filter {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}
/* 更新履歴 */

*,*:before,*:after {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.info {
  margin: 10px 30px 0px 30px;
  padding: 0 1.5em;
  border: 1px solid #ccc;
  text-align: left;
  font-size: 12px;
  font-family: "Noto Sans JP", sans-serif;
  line-height: 1.3;
  overflow: auto;
  height: 10em;
  background-color: #fcfcfc;
}
.info dl {
  padding: 0.5em 0;
  border-bottom: 1px solid #ccc;
}
.info dt {
  padding-bottom: 0;
  width: 6.5em;
}
@media screen and (min-width: 480px) {
  .info dt {
    clear: left;
    float: left;
  }
  .info dd {
    margin-left: 0.5em;
  }
}

* {
  box-sizing: border-box;
}
.container {
  max-width: 1400px; /* コンテンツの最大幅を指定 */
  margin: 0 auto; /* 中央寄せ */
  display: flex;
  flex-direction: column; /* 上下段を縦に並べる */
  gap: 20px;
  padding: 20px;
}
.top-row {
  display: flex; /* D&Dと履歴を横に並べる */
  align-items: stretch; /* 高さを揃える */
  gap: 12px;
}
.top-row > .tile {
  min-height: 260px;
  height: auto;
}
#drop-zone {
  flex: 0 0 25%;
  width: auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#history-zone {
  flex: 1 1 0;
  width: auto;
  margin: 0;
  padding-top: 0;
}
#history-zone h3 {
  margin-top: 10px; /* 上マージンを微調整 */
  margin-bottom: 18px; /* 下マージンを微調整 */
}
#result-zone {
  width: 100%;
  margin-left: 0;
}
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.tile {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.info-container {
  padding: 20px;
}

/* --- History List CSS --- */
#history-list {
  flex-grow: 1; /* 親要素(#history-zone)の高さに追従 */
  overflow: visible;
}
#history-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  height: auto;
  overflow: visible;
}
#history-list li {
  padding: 6px 6px; /* 左余白を縮小 */
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}
#history-list li:hover {
  background-color: #f5f5f5;
}
#history-list .select-box {
  flex: 0 0 auto;
  margin-right: 8px;
}
#history-list .filename {
  font-weight: normal; /* boldから変更 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-basis: 40%;
  margin-right: 4px;
}
#history-list .datetime {
  font-size: 0.8em;
  color: #666;
  flex-basis: 25%;
}
#history-list .status {
  font-size: 0.8em;
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
}
#history-list .status.success {
  background-color: #28a745;
}
#history-list .status.error {
  background-color: #dc3545;
}
#history-list .bei {
  font-size: 0.9em;
  flex-basis: 15%;
  text-align: right;
}
.history-actions {
  display: flex;
  gap: 8px;
  margin: 0 0 10px 0;
  justify-content: flex-end;
}
.history-actions button {
  padding: 6px 10px;
  border: 1px solid #d0d5dd;
  background: #f7f8fa;
  border-radius: 6px;
  cursor: pointer;
  color: #344054;
  font-size: 12px;
}
.history-actions button:hover {
  background: #eef2f7;
  border-color: #c0c6d0;
}

#history-list li.selected {
  background-color: #e6f3ff;
}
