.cool-box {
    display: grid;
    grid-template-rows: min-content;
    width: calc(100% - 260px - 260px);
    height: 100%;
    padding: 20px;
    box-shadow: 0px 10px 20px rgba(0,0,0,0.19), 0px 6px 6px rgba(0,0,0,0.23);
}

.cool-box a {
    color: lightsalmon;
}
.cool-box a:hover {
    color: navajowhite;
}

#input_msg {
    padding-bottom: 0px;
}

.textarea-container {
    display: inline-block;    
}

.chat-textarea {
    box-shadow: 0 0 10px 0px #888 !important; 
 }

#progress-bar {
    top: 0;
    z-index:9999;
}

#text {
    position: absolute;
    width: 100%;
    height: 110px;
    min-height: 100%;
    overflow: auto;
    margin-top: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 3.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    line-height: 1.5;
    resize: none;
}

#text:disabled {
    background-color: darkred;
}

/* 入力枠に入力されている(valid)のときの直後(+)の要素   */
#text.valid + i.paper.plane.outline.icon {
    color: white;
    background-color: limegreen;
    pointer-events: initial;
    cursor: pointer;
}
#text + i.pause.icon {
    pointer-events: initial;
    cursor: pointer;
}

.send-text {
    position: absolute;
    width: 36px !important;
    height: 36px !important;
    top: 8px !important;
    right: 0px !important;
    padding: 12px !important;
    border-radius: 0.3rem !important;
}

#tool-icons {
    position: absolute;
    margin-top: 16px !important;
    margin-left: 12px !important;
    font-size: 1.25em;
    z-index: 1000;
}

#tool-icons i.icon {
    line-height: 1.5;
}

i.icon#add-file{
    opacity: 0.5 !important;
    pointer-events: initial !important;
    cursor: pointer !important;
}

i.icon#add-file:hover {
    opacity: 0.8 !important;
}

.streaming_msg {
    overflow-y: scroll;
    height: calc(100vh - 150px);
    scrollbar-width: thin;
}

.chat {
    display: table;
    margin: 10px;
    width: calc(100% - 20px);
}

.hljs {
    max-width: calc(100vw - 710px);
}

.chat i {
    display: table-cell !important;
    vertical-align: top !important;
    padding-top: 10px !important;
}
.chat div:not(.file-container,.file-attach,.file-icon) {
    min-height: 41px;
    border: 1px solid #ddd;
    margin: 0;
    margin-left: 5px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    border-radius: 5px;
}

.chat table {
    border: 1px solid;
    border-collapse: collapse;
}

.chat table th, .chat table td{
    border: 1.5px solid;
    padding: 0.2em 1em;
}

.chat div > p {
    line-height: 1.4;
    margin: 0.3rem 0;
}

.chat div li {
    margin: 0.3rem 0;
}

.chat div ul > li > p {
    margin: 1rem 0 0.3rem 0;
    white-space: pre-wrap;
}

.chat div ol > li > p {
    margin: 1rem 0 0.3rem 0;
    white-space: pre-wrap;
}

.chat div img.image_generation_call {
    width: 50%;
}

.pre > p{
    white-space: pre-wrap;
    margin: 0;
}

#left-sidebar, #right-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#left-sidebar > .middle, #right-sidebar > .middle {
    overflow-y: scroll;
    flex-grow: 1;
    scrollbar-width: none;
}
#left-sidebar > .middle::-webkit-scrollbar, #right-sidebar > .middle::-webkit-scrollbar {
    display: none;
}

#left-sidebar a.item, #right-sidebar a.item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#left-sidebar > .middle > a.date, #right-sidebar > .middle > a.prompt-type {
    padding: 0.5em;
    margin: 5px 50% 0 5%;
    font-size: 0.7em;
    text-align: center;
    color: #fffffe;
    background-color: rgb(100, 100, 100);
    border-radius: 12px 12px 0 0 !important;
}

#left-sidebar > .middle > a.date:hover, #right-sidebar > .middle > a.prompt-type:hover {
    background-color: rgb(100, 100, 100);
    cursor: default;
}

#left-sidebar .bottom, #right-sidebar .bottom {
    /*position: fixed;*/
    width: 100%;
}

/* ラジオボタンのスタイル */
.radio-button {
    display: none; /* 原本のラジオボタンを非表示にする */
}

/* ボタンのスタイル */
.radio-button-label {
    display: inline-block;
    padding: 10px 20px;
    background-color: #999999;
    color: #fff;
    cursor: pointer;
    border-radius: 5px;
    border: 1px solid #999999;
    text-align: center;
    width: 100%;
}

/* ラジオボタンがチェックされたときのボタンのスタイル */
.radio-button:checked + .radio-button-label {
    background-color: #21ba45;
    border-color: #21ba45;
}

/* ゴミ箱アイコンのスタイル*/
.middle > a.item.chat-menu > i.delete-history {
    opacity: 0;
}

.middle > a.item.chat-menu:hover > i.delete-history {
    opacity: 0.2;
}

.middle > a.item.chat-menu > i.delete-history:hover {
    opacity: 1;
}

.middle > a.item.chat-menu.active > i.delete-history {
    opacity: 0.5;
}

.middle > a.item.chat-menu.active > i.delete-history:hover {
    opacity: 1;
}

/* ？アイコンのスタイル*/
.middle > a.item.sub-menu > i.prompt-detail {
    opacity: 0;
}

.middle > a.item.sub-menu:hover > i.prompt-detail {
    opacity: 0.2;
}

.middle > a.item.sub-menu > i.prompt-detail:hover {
    opacity: 1;
}

.middle > a.item.sub-menu.active > i.prompt-detail {
    opacity: 0.5;
}

.middle > a.item.sub-menu.active > i.prompt-detail:hover {
    opacity: 1;
}

/* 編集、削除アイコンのスタイル*/
.middle > a.item.sub-menu > i.edit, .middle > a.item.sub-menu > i.delete-prompt {
    opacity: 0;
}

.middle > a.item.sub-menu:hover > i.edit, .middle > a.item.sub-menu:hover > i.delete-prompt {
    opacity: 0.2;
}

.middle > a.item.sub-menu > i.edit:hover, .middle > a.item.sub-menu > i.delete-prompt:hover {
    opacity: 1;
}

.middle > a.item.sub-menu.active > i.edit, .middle > a.item.sub-menu.active > i.delete-prompt {
    opacity: 0.5;
}

.middle > a.item.sub-menu.active > i.edit:hover, .middle > a.item.sub-menu.active > i.delete-prompt:hover {
    opacity: 1;
}

/* チェックアイコンのスタイル*/
.middle > a.item.sub-menu i.check.icon {
    opacity: 0;
}

.middle > a.item.sub-menu i.check.icon:hover {
    opacity: 0.5;
}

.middle > a.item.sub-menu.active i.check.icon {
    opacity: 1;
}

/* コピーアイコン、再利用アイコンのスタイル */
.chat > i.copy, .chat > i.redo {
    padding-left: 7px;
    opacity: 0;
}

.chat:hover > i.copy, .chat:hover > i.redo {
    opacity: 0.5;
}

.chat:hover > i.copy:hover, .chat:hover > i.redo:hover {
    opacity: 1;
    cursor: pointer;
}

.streaming_msg pre{
    position: relative;
}

.streaming_msg pre > code{
    display: block;
    overflow-x: auto;
    padding: 1rem;
    max-width: calc(100vw - 45rem);
    background: #f3f3f3;
    color: #444;
}

/* コードアイコンのスタイル */
pre > button.ui.button {
    padding: 5px !important;
    width: 35px;
    position: sticky;
    top: 0px;
}

pre > button.ui.button:hover {
    cursor: pointer;
}

pre > button.ui.button > i {
    padding: 0 !important;
}

/* 設定モーダルのスタイル */
.config-tab {
    margin: 0 !important;
    padding: 1rem !important;
    border: 0 !important;
}

.config-contet {
    position: relative;
    margin: 0 auto;
}

.unauthorized {
    position: absolute;
    left: -1rem;
    top: calc(-1rem - 1px) ;
    width: calc(100% + 2rem);
    height: calc(100% + 2.2rem);
    color: #fff;
    background: rgba(0,0,0,.7);
    z-index: 1002;
    display: flex !important;
    align-items: center;
    margin: 0;
}

.unauthorized-message {
    text-align: center;
    margin: auto;
}

.unauthorized-message > * {
    margin: 6px !important;
}

.unauthorized-message > i.user.lock {
    color: #fff;
    font-size: 3rem;
}

.unauthorized-message > h3 {
    font-size: 1.2rem;
}

#prompt-color, #doc-color, #google-color, #font-size {
    margin: 5px 0 !important;
}

.color-sample {
    width: 15.7% !important;
    height: 6.5% !important;
    padding: 10px 5px !important;
    margin: 2px !important;
    margin-bottom: 5px !important;
    box-shadow: 0 0 3px 0px #888 !important;
    opacity: 0.3;

}

.color-sample.active {
    opacity: 1;
}

.color-sample:hover {
    opacity: 1;
}


.size-sample {
    width: 18% !important;
    padding: 10px 0!important;
    margin: 2px auto !important;
    margin-bottom: 5px !important;
    box-shadow: 0 0 3px 0px #888 !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    border: solid #000 2px !important;
    border-radius: 5px !important;
    background-color: #fff !important;
    color: #000 !important;
}

.size-sample.active, .size-sample:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.config-menu {
    margin: 30px 0 0 !important;
}

/*　個人プロンプトモーダルのスタイル */

.validation {
    color: #9e0300;
    font-weight: 500;
    font-size: 0.9rem;
}

.prompt-user-detail > summary{
    list-style: none;
}

.prompt-user-detail > summary > i{
    margin-left: 0.5em;
    color: rgba(0,0,0,.6);
}

.prompt-user-detail[open] > summary > i{
    color: rgba(0,0,0,.9);
}

.prompt-user-detail > div > p{
    margin: 0.3em 0;
    font-size: 0.9em;
}

/* 生成中アイコンのスタイル */

i.generate-icon {
    font-size: 1em;
    animation-name: swing;
    animation-duration: 2s;
    animation-delay: 0s;
    animation-iteration-count: infinite;
 }

 @keyframes swing {
    0% { -webkit-transform: rotate(0deg); }
    50% { -webkit-transform: rotate(-50deg); }
    100% { -webkit-transform: rotate(0deg); }
 }

 /* 色のテンプレート */

 .color-1 {
    background:  #f1f1f1 !important;
    color: #333 !important;
    border-color: #333 !important;
 }

 .color-1 .chat > div {
    border: 1px solid #333;
    border-bottom: 1px solid #333;
 }

 .color-1 code {
    box-shadow: 1px 1px 2px 0px #888 !important;
 }

 .color-2 {
    background: #636363 !important;
    color: #fff !important;
    border-color: #fff  !important;
 }

 .color-3 {
    background: #d06911  !important;
    color: #fff !important;
    border-color: #fff  !important;
 }

 .color-3 a {
    color: #32eb4b;
}

.color-3 a:hover {
    color: #b9ffc1;
}

 .color-4 {
    background:  #1678c2 !important;
    color: #fff !important;
    border-color: #fff  !important;
 }

 .color-5 {
    background: linear-gradient(45deg, #49a09d, #5f2c82) !important;
    color: #fff !important;
    border-color: #fff  !important;
 }

 .color-6 {
    background: linear-gradient(45deg, #86930e, #085e1a) !important;
    color: #fff !important;
    border-color: #fff  !important;
 }

 /* 右サイドバーのスタイル */
 .menu-name {
    position: sticky !important;
    z-index: 3000;
    background-color: #323538 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
 }

.prompt.menu-name, .document.menu-name {
    cursor: default !important;
}

.google.menu-name:hover {
    background-color: #4c5055 !important;
    color: #ffffff !important;
}

.selected-menu, a.item.google.menu-name.sub-menu.active.selected-menu{
    color: #2c2d2e !important;
    background-color: #ffffff !important;
}

/* フォントサイズ */

.font-size-1{
    font-size: 10px !important;
}

.font-size-2{
    font-size: 12px !important;
}

.font-size-3{
    font-size: 14px !important;
}

.font-size-4{
    font-size: 16px !important;
}

.font-size-5{
    font-size: 18px !important;
}

/* 再送ボタン、回答表示切替ボタンのスタイル */

.option {
    text-align: right;
    padding-right: 1.5rem;
}

i.resend, i.toggle {
    padding: 0 !important;
    text-align: right !important;
    font-size: smaller !important;
    opacity: 0.5 !important;
    margin: 0 7px 0 0 !important;
    float: right;
}

i.resend:hover, i.toggle:hover {   
    opacity: 1 !important;
}

/* 参照文書のダウンロードリンクのスタイル */
li a.file-download {
    cursor: pointer;
}

/* ログイン画面のスタイル */

body.login .ui.grid {
    align-content: center;
    margin: 0;
}

body.login .ui.grid > .row {
    height: fit-content;
    padding: 0.5rem 0;
}

body.login .ui.grid > .row> .column.service-name {
    width: fit-content;
    padding: 0 2rem;
}

body.login .ui.grid > .row> .column.service-name > span {
    font-size: calc(1.71428571rem * 4);
    font-weight: bold;
    margin: 0;
    line-height:1.0;
    background-image: linear-gradient(45deg, #00b5ad, #5064d4);
    animation: ani 15s infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* グラデーションのアニメーション */
@keyframes ani {
    0%,
    50% {
      filter: hue-rotate(0deg);
    }
    25% {
      filter: hue-rotate(30deg);
    }
    75% {
        filter: hue-rotate(-30deg);
    }
}

body.login .ui.grid > .row> .column.service-name > p {
    font-size: 1.7rem;
    font-weight: bold;
    line-height:1.0;
    font-style: italic;
    color:  rgb(4 150 165);
}

.column.info {
    min-width: 450px;
}

body.login div.message {
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
    min-height: 3.65rem;
    max-height: 16.8rem;
}

body.login .ui.stacked.segment {
    margin: 1rem 0;
}

body.login div.message h3.info {
    text-align: center;
}

body.login .ui.message p {
    margin-top: .25em;
    opacity: 1;
    text-overflow: ellipsis;
    white-space: pre-wrap;
}

body.login div.message > ul {
    padding: 0.5rem 1.5rem;
}

body.login div.message > ul > li {
    margin: 1rem 0;
}

body.login div.message > ul > li:nth-child(1) {
    margin-top: 0;
}

body.login div.message > ul > li:nth-last-child(1) {
    margin-bottom: 0;
}

body.login .image {
    margin-top: -100px;
}

body.login .ui.grid > .row:nth-child(2) > .column {
    max-width: 450px;
    width: 100%;
}

body.login .ui.grid > .row:nth-child(3) {
    min-height: 20%;
}

body.login .ui.grid > .row:nth-child(3) > .column {
    width: fit-content;
}

/* 添付ファイルのスタイル */
output#list {
    display: flex;
    margin-top: 8px;
    overflow-x: auto;
}

div.file-attach {
    vertical-align: top;
    text-align: center;
    cursor: pointer;
    padding: 5px 3px 0px 3px;
}

div.file-attach .file-icon {
    font-size: 1rem;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-image-container {
    position: relative;
    display: inline-block;
    border: 0px !important;
    padding: 0 !important;
}

#input_msg .file-image {
    margin-right: 15px;
}

.ui.icon.button.delete-file {
    position: absolute;
    top: -5px;
    right: 0px;
    padding: .3em !important;
    background-color: #fff;
    color:#000;
    cursor: pointer;
}

.color-1 .ui.icon.button.delete-file {
    background-color: #000;
    color:#fff;
}

.file-container {
    display: flex;
    flex-wrap: wrap;
}

 /* color-2の時、ファイル名が見にくいので文字色をチャットと統一 */
.file-icon {
    color: #fff;
}

.color-1 .file-icon {
    color: #333;
}

/* プロンプトの共有モーダル */
#user-search-results, #share-users {
    max-height: 25vh;
    overflow-y: auto;
}