

/* body-level
–––––––––––––––––––––––––––––––––––––––––––––––––– */

::-webkit-scrollbar{
    display:none;
  }



#message {
    font-weight: bold;
    font-size: 20px;
    color: red;
    display: none;
}

#main {
    display: flex;
}

#sub-menu {
    width: 180px;
    margin: 10px;
    color: #333;
    z-index: 2;
}

.submenu-title {
    margin-top: 10px;
    font-weight: bold;
}


#sub-menu .dropbtn {
    width: 180px;
}

#sub-menu .btn {
    width: 180px;
}

.sub-menu .dropdown-item {
    width: 250px;
}

.stripemenu {
    margin: 0;
}

.stripeoption {
    display: grid;
    grid-template-columns: 1fr auto; /* ← 右列が全行で同じ幅になり揃う */
    align-items: center;
    column-gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;

}

.stripeoption:last-child{ border-bottom: none; }

/* 左の説明（長文は省略表示） */
.stripeoption > a{
  min-width: 0;                   /* 省略表示のキモ */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #2563eb;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}


/* 右のボタン列（中はflexで横並び） */
.editoptions{
  display: flex;
  align-items: center;
  justify-content: flex-end;  /* 右寄せ */
  gap: 4px;
}

/* ボタンの見た目を統一（サイズ固定で高さズレ防止） */
.editoptions button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;           /* 固定幅にして揃える */
  height: 32px;          /* 固定高さにして揃える */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0;            /* 中央にアイコンだけ置く */
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.editoptions button:hover{
  background: #f3f4f6;
  border-color: #d1d5db;
}
.editoptions button:active{
  transform: translateY(1px);
}

/* Font Awesomeのアイコンサイズ */
.editoptions i{
  font-size: 12px;
  pointer-events: none;
}



/* The container <div> - needed to position the dropdown content */
.dropdown {
position: relative;
display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
display: none;
position: absolute;
left: 100%;
margin-top: -38px;
/*background-color: #f1f1f1;*/
min-width: 160px;
/*box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);*/
z-index: 1;
}

/* Links inside the dropdown */
.dropdown-content a {
display: inline-block;
height: 38px;
width: 250px;
padding: 0 10px;
color: #555;
text-align: center;
font-size: 11px;
font-weight: 600;
line-height: 38px;
letter-spacing: .1rem;
text-transform: uppercase;
/*text-decoration: none;*/
white-space: nowrap;
/*background-color: transparent;*/
background-color: white;
border-radius: 4px;
border: 1px solid #bbb;
cursor: pointer;
box-sizing: border-box;
}

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    background-color: #f3f4f6;}

/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {display: block;}

/* Change the background color of the dropdown button when the dropdown content is shown 
.dropdown:hover .dropbtn {
    background-color: #0d6efd;
    color: white;
}*/

/* Plotlyのhover boxを消して文字だけ残す 
.plot-container .hoverlayer .hovertext {
    fill: white !important;           
}*/

.plot-container .hoverlayer path {
    fill: none !important;               /* 背景の丸みを削除 */
    stroke: none !important;             /* 枠線も消す */
}

#centerline {
    color: black;
    background-color: #0000ffc2;
}

#main_content {
    height: calc(100vh - 130px);
    width: calc(100vw - 240px);
}

#loading {
    height: calc(100vh - 400px);
    width: calc(100vw - 400px);
}

#graph_content {
    position:absolute;
    height: calc(100vh - 130px);
    width: calc(100vw - 240px);
}

#footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    color: gray;
    height: 30px;
}

#default_img {
    display: none;
}

.spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.6);
    z-index: 9999;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}
.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /*background: rgba(255, 255, 255, 0.6);*/
    z-index: 5;
}

.upload-overlay button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    background: #3498db;
    color: #fff;
    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;   /* ←文字が上下左右中央に配置される */
    line-height: 1;            /* 下寄り防止 */
    transition: background 0.15s ease;
}

.upload-overlay button:hover {
    background: #2f89c7;
}




/* Dialogs
–––––––––––––––––––––––––––––––––––––––––––––––––– */
dialog {
    border: none;
    padding: 0;
    border-radius: 12px;
    background: #fff;
}

dialog::backdrop {
    background: rgba(0, 0, 0, .35);
}

.modal {
    padding: 16px;
    min-width: 280px;
}

.modal h3 {
    letter-spacing: 0.02em;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.btn {
    /*justify-content: center;
    padding: 4px 12px;*/
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    cursor: pointer
}

.btn.danger {
    color: #dc2626;
    background: #fff1f2;
    border-color: #fecaca
}


/* conditions menu
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.sub-menu2 {
    position:fixed;
    display: block;
    top: 0px;
    right: 0;
    width: 12px;
    height: 100%;
    background-color: #878787;
    animation-duration: 0.3s;
    animation-name: fadeout;
    -moz-animation-duration: 0.3s;
    -moz-animation-name: fadeout;
    -webkit-animation-duration: 0.3s;
    -webkit-animation-name: fadeout;
}

.submenu2-title {
    margin-top: 100px;
    margin-left: 50px;
    font-weight: bold;
}

.submenu2-top {
    width: 100%;
    display: flex;
}

.main_info {
    margin-left: 50px;
}

#conApply{
    margin: 0 50px 0 auto;
}

#filename_info {
    font-size: large;
    padding: 10px;
}

#time_info {
    padding: 10px;
}

.conditionTable {
    margin: 10px 50px;
}

.talbeinput {
    width: 120px;
}

.visible.sub-menu2 {
    width: 730px;
    background-color: #e3e3e3e9;
    animation-duration: 0.3s;
    animation-name: fadein;
    -moz-animation-duration: 0.3s;
    -moz-animation-name: fadein;
    -webkit-animation-duration: 0.3s;
    -webkit-animation-name: fadein;
}



/* result page
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.resultpage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#filename {
    font-style: italic;
    font-size: 30px;
    font-weight: bold;
    display:flex;
    justify-content: center;
    align-items: center;
}

#image_graph {
    height: 500px;
    width : 1000px;
    margin: 0px auto 10px;
}

#cdTable {
    margin: 0px auto 50px;
    table-layout: fixed;
}

#cdTable th {
    border-bottom: solid 4px #778ca3;
    color: #778ca3;
}

#cdTable select {
    border-color: white;
    text-align: center;
    font-weight: bold;
}

#cdTable td {
    text-align: center;
    border-bottom: solid 1px #778ca3;
}

#item_graph {
    display: grid;
    grid-template-columns: 350px 350px 350px;
    grid-auto-rows: 200px;
    gap: 10px 10px;
    justify-content: center;
}

.resulttable {
    overflow: auto;
}

#data_table {
    max-height: 400px;
    width: 800px;
    margin: 50px auto 20px;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
}

.resulttable th {
    top: 0;
    left: 0;
    padding: 8px;
    border-bottom: solid 4px #778ca3;
    background: white;
    color: #778ca3;
    text-align: center;
}

.resulttable td {
    padding: 8px;
    border-bottom: solid 1px #778ca3;
    text-align: center;
}


/* login Page
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.login_body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 80vh;
}

#top_title {
    display: flex;
    align-items: center;
}

#login_invalid {
    color: red;
    display: none;
}

#login_input {
    display: flex;
    flex-direction: column;
}

#login_input > input {
    width: 300px;
    margin-top: 10px;
}


#login_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.login_body a {
    padding-top: 15px;
}

#regist_complete_messege {
    padding: 30px;
}

#login_footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10vh;
    color: gray;
}

/* database Page
–––––––––––––––––––––––––––––––––––––––––––––––––– */

.database_main {
    display: grid;
    grid-template-columns: 54vw 44vw;
    width: 100%;
    height: calc(100vh - 140px);
    padding-top: 20px;
}

.database_left {
    display: grid;
    grid-template-rows: 40vh 44vh;
}

.image_area {
    display: grid;
    grid-template-columns: 27vw 27vw;
}

.image_container {
    display: flex;
    flex-direction: column;
}

.image_container .image {
    flex: 1;
}

.image_captions {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 1px 4px;
}

.img_title_input {
    width: 100%;
    padding: 2px 4px;
    border: none;
    border-bottom: 1px solid transparent;
    background: transparent;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
}

.img_memo_input {
    width: 100%;
    padding: 2px 4px;
    border: none;
    border-bottom: 1px solid transparent;
    background: transparent;
    font-size: 10px;
    color: #666;
    text-align: center;
}

.img_title_input:hover, .img_memo_input:hover {
    border-bottom: 1px solid #ddd;
}

.img_title_input:focus, .img_memo_input:focus {
    outline: none;
    border-bottom: 1px solid #0d6efd;
}

.table_area {
    overflow: auto;
}

.database_right {
    display: grid;
    grid-template-rows: 50vh 34vh;
    padding-left: 25px;
}

.graph_area {
    display: grid;
    grid-template-columns: 22vw 22vw;
    grid-template-rows: 25vh 25vh;
}


#dbtable {
    max-height: 30vh;
    width: calc(100% - 52px);
    margin: 0px 20px;
    border-collapse: collapse;
    border-spacing: 0;
    position: relative;
    table-layout: fixed;
}

.databaseTable th {
    position: sticky;
    top: 0;
    left: 0;
    padding: 4px;
    border-bottom: solid 4px #778ca3;
    background: white;
    color: #778ca3;
    z-index: 1; 
}

.data1 td {
    padding: 4px;
    font-size: 10px;
    border-bottom: solid 1px #778ca3;
    color: red;
}

.data2 td {
    padding: 6px;
    font-size: 10px;
    border-bottom: solid 1px #778ca3;
    color: blue;
}

.cambergraph_area {
    display: flex;
    flex-direction: column;
    padding-top: 10px;
}

.cambergraph_area * {
    height: 10vh;
}

.cambergraph_area select {
    font-size: 14px;       /* 文字サイズを小さく */
    padding: 2px 4px;      /* 内側の余白を調整 */
    height: 24px;          /* 高さを直接指定（任意） */
    line-height: 1.2;      /* 行の高さ */
    text-align: center;              /* テキスト中央揃え */
    text-align-last: center;         /* 選択中の項目を中央に揃える（重要） */
}

.cam_graph {
    display: block;
}

.cam_graph.active {
    display: block;
}

/* error Page
–––––––––––––––––––––––––––––––––––––––––––––––––– */

#error404 {
    display: flex;
    font-size: 32px;
    justify-content: center;
    margin: 35vh auto;
}


@keyframes fadein {
    0% {
        display: none;
        opacity: 0;
    }
    1% {
        display: block;
        opacity: 0;
    }
    100% {
        display: block;
        opacity: 1;
    }
}

/* Firefox < 16 */
@-moz-keyframes fadein {
    0% {
        display: none;
        opacity: 0;
    }
    1% {
        display: block;
        opacity: 0;
    }
    100% {
        display: block;
        opacity: 1;
    }
}

/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
    0% {
        display: none;
        opacity: 0;
    }
    1% {
        display: block;
        opacity: 0;
    }
    100% {
        display: block;
        opacity: 1;
    }
}

/* Internet Explorer */
@-ms-keyframes fadein {
    0% {
        display: none;
        opacity: 0;
    }
    1% {
        display: block;
        opacity: 0;
    }
    100% {
        display: block;
        opacity: 1;
    }
}

/* --- Fade OUT --- */

@keyframes fadeout {
    0% {
        display: block;
        opacity: 1;
    }
    1% {
        display: block;
        opacity: 1;
    }
    100% {
        display: none;
        opacity: 0;
    }
}

/* Firefox < 16 */
@-moz-keyframes fadeout {
    0% {
        display: block;
        opacity: 1;
    }
    1% {
        display: block;
        opacity: 1;
    }
    100% {
        display: none;
        opacity: 0;
    }
}

/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadeout {
    0% {
        display: block;
        opacity: 1;
    }
    1% {
        display: block;
        opacity: 1;
    }
    100% {
        display: none;
        opacity: 0;
    }
}

/* Internet Explorer */
@-ms-keyframes fadeout {
    0% {
        display: block;
        opacity: 1;
    }
    1% {
        display: block;
        opacity: 1;
    }
    100% {
        display: none;
        opacity: 0;
    }
}

.custom-alert {
    position: absolute;
    width: 100%;
    left: 0%;
    bottom: 10px;
    padding: 10px 30px;
    font-size: 20px;
    font-weight: bold;
    text-align: left;
    color: #ff5f43;
    background: rgb(236, 236, 236);
    display: none;
    animation-duration: 1s;
    animation-name: fadeout;
    -moz-animation-duration: 1s;
    -moz-animation-name: fadeout;
    -webkit-animation-duration: 1s;
    -webkit-animation-name: fadeout;
}

.visible.custom-alert {
    display: block;
    animation-duration: 0.3s;
    animation-name: fadein;
    -moz-animation-duration: 0.3s;
    -moz-animation-name: fadein;
    -webkit-animation-duration: 0.3s;
    -webkit-animation-name: fadein;
}