@charset "utf-8";

:root {
    --font-base-size: 16px;
}



#ws-chat-open-history {
    margin: 0 0 0 auto;
    width: max-content;
    color: #9f59ff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

#ws-chat-open-history img {
    display: inline-block;
    width: auto;
    height: 1.0rem;
    vertical-align: middle;
}

.ws-chat-history {
    margin: 16px auto;
    padding: var(--font-base-size);
    width: 100%;
    max-width: 1200px;
    background: #f8f8f8;
    box-shadow: 0 0 4px #ccc;
    border-radius: 4px;
}

.ws-chat-history .history-date {
    margin: 16px 0 0;
    font-size: 70%;
    text-align: right;
}

.ws-chat-history .history-q {
    margin: 8px 0 0 10%;
    padding: var(--font-base-size);
    width: 90%;
    font-size: 80%;
    line-height: 1.5;
    box-shadow: 0 0 4px #ccc;
    border-radius: 4px;
}

.ws-chat-history .history-a {
    margin: 8px 10% 0 0;
    padding: var(--font-base-size);
    width: 90%;
    font-size: 80%;
    line-height: 1.5;
    box-shadow: 0 0 4px #ccc;
    border-radius: 4px;
}


.ws-chat-box {
    margin: 0 auto;
    padding: var(--font-base-size);
    width: 100%;
    max-width: 1200px;
    background: #f8f8f8;
    box-shadow: 0 0 4px #ccc;
    border-radius: 4px;
}


.ws-chat-area {
    margin: 0;
    padding: 0;
    width: 100%;
}

.ws-chat-area img {
    height: auto;
    vertical-align: middle;
}

.ws-chat-area:empty {
    display: none;
}

.ws-chat-area * {
    box-sizing: border-box;
}

.ws-chat-area .ws-q-area {
    margin: calc( var(--font-base-size) * 2.0 ) 0 0;
    padding: 0 0 0 10%;
    width: 100%;
    opacity: 0.0;
    transition: 0.5s;
}

.ws-chat-area .ws-q-area.show {
    opacity: 1.0;
}

.ws-chat-area .ws-q-area .ws-icon {
    margin: 0 0 0 auto;
    padding: 0;
    width: 64px;
}

.ws-chat-area .ws-q-area .ws-icon img {
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
}

.ws-chat-area .ws-q-area .ws-question {
    margin: calc( var(--font-base-size) * 0.5 ) calc( var(--font-base-size) * 1.0 );
    padding: calc( var(--font-base-size) * 1.0 );
    width: calc( 100% - var(--font-base-size) * 2.0 );
    background: #fff;
    box-shadow: 0 0 4px #ccc;
    border-radius: 4px;
    white-space: pre-wrap;
}

.ws-chat-area .ws-a-area {
    margin: calc( var(--font-base-size) * 2.0 ) 0 0;
    padding: 0 10% 0 0;
    width: 100%;
    opacity: 0.0;
    transition: 0.5s;
}

.ws-chat-area .ws-a-area.show {
    opacity: 1.0;
}

.ws-chat-area .ws-a-area .ws-icon {
    margin: 0 auto 0 0;
    padding: 0;
    width: 64px;
}

.ws-chat-area .ws-a-area .ws-icon img {
    display: block;
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
}

.ws-chat-area .ws-a-area .ws-answer {
    margin: calc( var(--font-base-size) * 0.5 ) calc( var(--font-base-size) * 1.0 );
    padding: calc( var(--font-base-size) * 1.0 );
    width: calc( 100% - var(--font-base-size) * 2.0 );
    background: #efe;
    box-shadow: 0 0 4px #6c6;
    border-radius: 4px;
    /* white-space: pre-wrap; */
}

.ws-chat-area .ws-a-area .ws-markdown {
    line-height: 1.5;
}

.ws-chat-area .ws-a-area .ws-markdown ul,
.ws-chat-area .ws-a-area .ws-markdown ol,
.ws-chat-area .ws-a-area .ws-markdown ul li,
.ws-chat-area .ws-a-area .ws-markdown ol li,
.ws-chat-area .ws-a-area .ws-markdown ul li p,
.ws-chat-area .ws-a-area .ws-markdown ol li p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.ws-chat-area .ws-a-area .ws-ref-title {
    margin: 2.0em 0 0;
    padding: 0;
}

.ws-chat-area .ws-a-area ol.ws-references {
    margin: 0.5rem 0 0.5rem 2.5rem;
}

.ws-chat-area .ws-a-area ol.ws-references a {
    color: #006;
    text-decoration: none;
}

.ws-chat-area .ws-a-area pre {
    margin: calc( var(--font-base-size) * 0.5 ) calc( var(--font-base-size) * 1.0 );
    padding: calc( var(--font-base-size) * 1.0 );
    width: calc( 100% - var(--font-base-size) * 2.0 );
    background: #eee;
    box-shadow: 0 0 4px #ccc;
    border-radius: 4px;
}

.ws-chat-area .ws-eval {
    position: relative;
    margin: 2.0rem 0 1.0rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 1.0rem;
}

.ws-chat-area .ws-eval img {
    margin: 0;
    padding: 0;
    width: 2.0rem;
    height: 2.0rem;
    cursor: pointer;
    transition: 0.5s;
}

.ws-chat-area .ws-eval img.disabled {
    filter: grayscale(100%) opacity(0.2);
}

@media ( hover: hover ) {
    .ws-chat-area .ws-eval img[onclick]:hover {
        opacity: 0.5;
    }
}


.ws-input-area {
    margin: 0;
    padding: 0;
    width: 100%;
}

.ws-input-area * {
    box-sizing: border-box;
}

.ws-input-area img {
    height: auto;
    vertical-align: middle;
}

.ws-input-area.active {
    margin-top: calc( var(--font-base-size) * 3.0 );
}

.ws-input-area #ws-error {
    margin: 1.0rem 0 0;
}

.ws-input-area #ws-input-title {
    margin: 1.0rem 0 0;
    display: flex;
    justify-content: space-between;
}

.ws-input-area #ws-input-title a {
    font-size: 0.9rem;
    color: #9f59ff;
    font-weight: 700;
}

.ws-input-area #ws-input-title a img {
    display: inline-block;
    width: auto;
    height: 1.1rem;
    vertical-align: middle;
}

.ws-input-area .ws-form-wrap {
    position: relative;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.ws-input-area .ws-form-wrap form {
    padding: 0;
    width: 100%;
    height: 100%;
}


.ws-input-area .ws-form-support {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ws-input-area label.ws-support input[type="checkbox"] {
    position: absolute;
    display: inline-block;
    margin: 0;
    padding: 0;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ws-input-area label.ws-support:has(input[type="checkbox"]) {
    position: relative;
    display: inline-block;
    margin: 0;
    padding: 0;
    width: 100px;
    height: 30px;
    border-radius: 30px;
    box-shadow: 0 0 2px #ccc,
                2px 2px 2px rgb( 0 0 0 / 0.1 ) inset,
                -2px -2px 2px rgb( 255 255 255 / 0.5 ) inset;
    transition: 0.5s;
}

.ws-input-area label.ws-support:has(input[type="checkbox"]:not(:checked)) {
    background: #eee;
}

.ws-input-area label.ws-support:has(input[type="checkbox"]:not(:checked))::before {
    position: absolute;
    content: "OFF";
    color: #999;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate( -50%, -50% );
}

.ws-input-area label.ws-support:has(input[type="checkbox"]:not(:checked))::after {
    position: absolute;
    content: "";
    top: 2px;
    left: 2px;
    bottom: auto;
    right: auto;
    width: 26px;
    height: 26px;
    background: #eee;
    box-shadow: 2px 2px 2px rgb( 255 255 255 / 0.5 ) inset,
                -2px -2px 2px rgb( 0 0 0 / 0.1 ) inset;
    border-radius: 26px;
    transition: 0.5s;
}

.ws-input-area label.ws-support:has(input[type="checkbox"]:checked) {
    background: #6f6;
}

.ws-input-area label.ws-support:has(input[type="checkbox"]:checked)::before {
    position: absolute;
    content: "ON";
    color: #333;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate( -50%, -50% );
}

.ws-input-area label.ws-support:has(input[type="checkbox"]:checked)::after {
    position: absolute;
    content: "";
    top: 2px;
    left: 72px;
    bottom: auto;
    right: auto;
    width: 26px;
    height: 26px;
    background: #eee;
    box-shadow: 2px 2px 2px rgb( 255 255 255 / 0.5 ) inset,
                -2px -2px 2px rgb( 0 0 0 / 0.1 ) inset;
    border-radius: 26px;
    transition: 0.5s;
}

.ws-input-area #ws-support-detail {
    margin: 0.2rem 0 1.0rem;
    padding: 1.0rem;
    border: 1px solid #eee;
    box-shadow: 0 0 4px #ccc;
    background: #fff;
    border-radius: 4px;
}

.ws-input-area #ws-support-detail div.ws-head1 {
    margin: 0.2rem 0;
    padding: 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.ws-input-area #ws-support-detail div.ws-head2 {
    margin: 1.0rem 0 0;
    padding: 0;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 700;
}

.ws-input-area .ws-support-flex {
    margin: 0 0 0 1.0rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ws-input-area .ws-support-flex > div {
    margin: 0 1.5rem 0.5rem 0;
    width: calc( 32% - 1.5rem );
    white-space: nowrap;
}

.ws-input-area .ws-support-flex select {
    margin: 0;
    padding: 0.2rem 0.5rem;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ws-input-area .ws-support-flex label input[type="checkbox"] {
    position: absolute;
    display: inline-block;
    margin: 0;
    padding: 0;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ws-input-area .ws-support-flex label:has(input[type="checkbox"]) {
    position: relative;
    display: inline-blcok;
    margin: 0;
    padding: 0 0 0 1.5em;
}

.ws-input-area .ws-support-flex label:has(input[type="checkbox"])::before {
    position: absolute;
    content: "";
    display: block;
    margin: 0;
    padding: 0;
    top: calc( 50% - 0.5em );
    left: 2px;
    width: 1.0em;
    height: 1.0em;
    border: 1px solid #00f;
    background: #fff;
    border-radius: 2px;
}

.ws-input-area .ws-support-flex label:has(input[type="checkbox"])::after {
    position: absolute;
    content: "";
    display: block;
    margin: 0;
    padding: 0;
    top: calc( 50% - 0.4em );
    left: 0.2em;
    width: 1.0em;
    height: 0.5em;
    border-left: 4px solid #00f;
    border-bottom: 4px solid #00f;
    border-radius: 4px;
    opacity: 0.0;
    transform: rotate( -30deg ) scale( 1.0, 0.0 );
    transition: 0.5s;
}

.ws-input-area .ws-support-flex label:has(input[type="checkbox"]:checked)::after {
    opacity: 1.0;
    transform: rotate( -30deg ) scale( 1.0, 1.0 );
}


.ws-input-area .ws-form-wrap .ws-button img {
    margin: 0;
    padding: 0;
    width: 100%;
    height: auto;
    cursor: pointer;
    opacity: 1.0;
    transition: 0.5s;
}

@media ( hover: hover ) {
    .ws-input-area .ws-form-wrap .ws-button img:hover {
        opacity: 0.5;
    }
}

.ws-input-area .ws-textarea {
    position: relative;
    margin: 0;
    width: 100%;
    height: 100%;
}

.ws-input-area textarea {
    margin: 0;
    padding: calc( var(--font-base-size) * 0.5 ) calc( var(--font-base-size) * 4.0 ) calc( var(--font-base-size) * 0.5 ) calc( var(--font-base-size) * 1.0 );
    width: 100%;
    height: 3.0rem;
    font-size: calc( var(--font-base-size) * 1.0 );
    vertical-align: middle;
    outline: 0;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 0 4px #ccc;
    border-radius: 4px;
    resize: none;
}

.ws-input-area textarea::placeholder {
    color: #ccc;
}

.ws-input-area .ws-textarea:disabled {
    background: #ccc;
}

.ws-input-area .ws-textarea .ws-button {
    position: absolute;
    margin: 0 calc( var(--font-base-size) * 1.0 ) 0 0;
    padding: 0;
    width: 40px;
    height: 40px;
    top: 50%;
    bottom: auto;
    left: auto;
    right: 6px;
    transform: translateY( -50% );
}
.ws-input-area .ws-textarea .ws-button img {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


.ws-input-area button {
    margin: 0;
    padding: calc( var(--font-base-size) * 0.5 ) calc( var(--font-base-size) * 1.0 );
    width: 100%;
    height: calc( var(--font-base-size) * 2.5 );
    font-size: calc( var(--font-base-size) * 1.0 );
    outline: 0;
    color: #fff;
    font-weight: 700;
    background: #9f59ff; /* #009; */
    border: 1px solid #ccc;
    box-shadow: 0 0 4px #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.5s;
}

@media ( hover: hover ) {
    .ws-input-area button:hover:not(:disabled) {
        opacity: 0.5;
    }
}

.ws-input-area button:disabled {
    background: #999;
}

.ws-input-area #ws-histories {
    display: none;
}



.ws-wait-anim {
    position: relative;
    margin: 40px auto;
    padding: 0;
    width: 80px;
    height: 80px;
    background: transparent;
    animation: anim-wait 2s linear infinite;
}

.ws-wait-anim::before {
    position: absolute;
    content: "";
    margin: 0;
    padding: 0;
    width: 16px;
    height: 16px;
    top: 32px;
    left: 32px;
    background: transparent;
    border-radius: 10px;
    box-shadow:
        -20px -20px 4px rgb( 0 0 0 / 0.1 ),
        0px -28px 4px rgb( 0 0 0 / 0.2 ),
        20px -20px 4px rgb( 0 0 0 / 0.3 ),
        28px   0px 4px rgb( 0 0 0 / 0.4 ),
        20px  20px 4px rgb( 0 0 0 / 0.5 ),
        0px  28px 4px rgb( 0 0 0 / 0.4 ),
        -20px  20px 4px rgb( 0 0 0 / 0.3 ),
        -28px   0px 4px rgb( 0 0 0 / 0.2 )
    ;
}

@keyframes anim-wait {
    0%   { transform: rotate(   0deg ); }
    100% { transform: rotate( 360deg ); }
}


.ws-chat-area .ws-a-area .ws-eval .ws-popup {
    position: absolute;
    margin: 0;
    padding: calc( var(--font-base-size) * 2.0 ) var(--font-base-size) var(--font-base-size);
    width: max-content;
    min-width: 200px;
    max-width: 100%;
    height: auto;
    right: 10px;
    bottom: 100%;
    top: auto;
    left: auto;
    background: rgb( 255 240 255 / 0.9 );
    border-radius: 10px;
    box-shadow: 8px 8px 16px rgb(   0   0   0 / 0.2 ),
                inset  4px  4px  4px rgb( 255 255 255 / 0.5 ),
                inset -4px -4px  4px rgb(   0   0   0 / 0.2 );
    display: none;
    opacity: 0.0;
    transition: 0.5s;
}

.ws-chat-area .ws-a-area .ws-eval .ws-popup.show {
    display: block;
    opacity: 1.0;
}

.ws-popup .ws-close {
    position: absolute;
    margin: 0;
    padding: 0;
    width: 24px;
    height: 24px;
    top: 8px;
    right: 8px;
    left: auto;
    bottom: auto;
    background: #f00;
    border-radius: 30px;
    box-shadow: 4px 4px 4px #ccc;
    cursor: pointer;
    transition: 0.5s;
}

.ws-popup .ws-close::before {
    position: absolute;
    content: '';
    margin: 0;
    padding: 0;
    width: 18px;
    height: 4px;
    top: 10px;
    left: 3px;
    background: #fff;
    transform-origin: center center;
    transform: rotate( 45deg );
}

.ws-popup .ws-close::after {
    position: absolute;
    content: '';
    margin: 0;
    padding: 0;
    width: 18px;
    height: 4px;
    top: 10px;
    left: 3px;
    background: #fff;
    transform-origin: center center;
    transform: rotate( -45deg );
}

@media ( hover: hover ) {
    .ws-popup .ws-close {
        opacity: 0.5;
    }
}

.ws-popup .ws-text {
    margin: 0.5rem 0;
    padding: 0;
    width: 100%;
    text-align: center;
}

.ws-popup .ws-text textarea {
    margin: 0.5rem 0;
    padding: 0.5rem;
    width: 100%;
    height: 5.0rem;
    background: #fff;
    border-radius: 4px;
    border: 0;
    outline: 0;
}

.ws-popup .ws-link {
    margin: 0.5rem 0;
    padding: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ws-popup .ws-link a,
.ws-popup .ws-link button.ws-send {
    display: block;
    margin: 0 auto;
    padding: 0.5rem 1.0rem;
    width: max-content;
    color: #333;
    text-decoration: none;
    background: rgb( 255 215 0 / 1.0 );
    box-shadow: inset  4px  4px  4px rgb( 255 255 255 / 0.5 ),
                inset -4px -4px  4px rgb(   0   0   0 / 0.2 );
    border-radius: 4px;
    cursor: pointer;
    transition: 0.5s;
}

.ws-popup .ws-link button.ws-skip {
    display: block;
    margin: 0 0.2rem;
    padding: 0.5rem 1.0rem;
    width: max-content;
    color: #fff;
    text-decoration: none;
    background: rgb( 192 192 192 / 1.0 );
    box-shadow: inset  4px  4px  4px rgb( 255 255 255 / 0.5 ),
                inset -4px -4px  4px rgb(   0   0   0 / 0.2 );
    border-radius: 4px;
    cursor: pointer;
    transition: 0.5s;
}

@media ( hover: hover ) {
    .ws-popup .ws-link button:hover,
    .ws-popup .ws-link a:hover {
        opacity: 0.5;
    }
}
