/* initializeCSS */
#chatbot-container * {
    box-sizing: border-box;
}

/* 初期状態: 画面外に配置 */
#chatbot-tab {
    position: fixed;
    right: -100px; /* 画面外に隠す */
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 10px 20px 10px;
    background-color: #002896;
    color: white;
    font-size: 16px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    writing-mode: vertical-rl; /* 縦書きに設定 */
    text-orientation: mixed; /* 文字の向き */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.5;
    font-weight: bold;
    letter-spacing: 2px;
    /* アニメーション用のトランジション */
    transition: right 1s ease;
}
#chatbot-tab img {
    margin: -5px -8px 0 -10px;
}
.tatechu{
    text-combine-upright: all;
}
#chatbot-tab i {
    font-size: 24px;
    margin-bottom: 8px;
}
#chatbot-tab.show {
    right: 0; /* アニメーション後の位置 */
}
#chatbot-tab:hover {
    opacity: .9;
}
#chatbot-container {
    position: fixed;
    bottom: 0;
    right: 20px;
    opacity: 0;
    visibility: hidden;
    width: 360px;
    max-width: 90%; /* スマホ向け調整 */
    height: 66%;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-radius: 10px 10px 10px 10px;
    overflow: hidden;
    transition: transform .3s ease, opacity .5s ease, visibility .5s;
    z-index: 9999;
    transform-origin: bottom right;
    transform: scale(0);
}
/* メッセージエリア表示時にテキスト枠の下線が消える対応 */
.webchat__bubble__content {
    margin-bottom: 1px;
}
/* ------------------------------------------- */
#chatbot-container a{
    color: rgb(0, 99, 177);
}
#chatbot-container a:hover{
    text-decoration: underline;
}
.webchat__suggested-actions__item-box button:hover{
    cursor: pointer;
    background: #EFF4F7;
}
.ac-image:hover{
        cursor: pointer;
        background: #EFF4F7;
}
#chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #002896;
    color: white;
    padding: 10px;
    font-size: 14px;
    height: 60px;
}
#chatbot-header h2 img {
    vertical-align: middle;
    margin: 0 -5px 3px -5px;
}
#chatbot-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap:10px;
}
#chatbot-header .close-icon {
    cursor: pointer;
    background: transparent;
    border: none;
    color: white;
}
#chatbot-header .close-icon:hover {
    color: inherit;
}
#webchat {
    height: calc(100% - 60px); /* チャットボット部分の高さ */
    width: 100%;
    display: none;
}
/* チャットバブルのテキスト */
.webchat__bubble__content, .webchat__bubble__content p {
    font-size: 14px !important;
}
@media screen and (max-width: 768px) {
    .webchat__bubble__content, .webchat__bubble__content p,
    .webchat__suggested-action__text {
        font-size: 15px !important;
    }
}
/* 提案ボタンのテキスト */
.webchat__suggested-action__text {
    font-size: 13px !important;
}
/* 入力フィールドのテキスト */
.webchat__textarea, .webchat__send-box__text-box {
    font-size: 14px !important;
}
.webchat__auto-resize-textarea .webchat__auto-resize-textarea__textarea {
    min-height: 50px!important;
}
.webchat__basic-transcript__activity-indicator.webchat__basic-transcript__activity-indicator--focus {
    border: none!important;
}
.webchat__send-box__button {
    background: url('icon_send.svg') no-repeat center center; /* カスタムアイコン */
    background-size: contain;
    width: 24px!important;
    height: 24px;
    margin: auto 5px;
    cursor: pointer;
}
.webchat__icon-button__shade {
    display: none;
}
#chatbot-container svg {
    display: none;
}
/* アバターアイコンサイズ */
.webchat__avatar {
    width: 32px; /* アバターの幅 */
    height: 32px; /* アバターの高さ */
}
.webchat__initialsAvatar,.webchat__defaultAvatar  {
    background-color: none !important;
}
.webchat__link-definitions__list-item-text{
    font-size: 12px;
}
.webchat__suggested-actions__stack{
    text-align: right;
}
.webchat__suggested-actions__item-box{
    margin-left: .2em;
    font-size: 12px;
    padding: 2px !important;
    min-width: 45%;
    display: inline-block !important;
    max-width: calc(100% - 10px)!important;
}
.webchat__suggested-action{
    padding: .9em !important;
    border-width: 1px !important;
}
.webchat__suggested-actions__focus-indicator  {
    border: none !important;
}
.webchat__send-box__main {
    border-color: #333 !important;
    min-height: 50px !important;
    margin-top: 8px;
}
.webchat__modal-dialog__body p {
    font-size: 15px;
}
#chatbot-container .webchat__modal-dialog__box svg {
    display: block;
}
.webchat__modal-dialog .webchat__modal-dialog__close-button-image {
    width: 16px!important;
    height: 16px!important;
}
.webchat__modal-dialog__close-button {
    border: none!important;
    background: none!important;
    cursor: pointer;
}
.webchat__suggested-actions__button {
    border-radius: 2px!important;
}
#chatbot-container a {
    text-decoration: underline!important;
}

@media screen and (max-width: 480px) {
    #chatbot-container {
        right: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .webchat__bubble__content, .webchat__bubble__content p,
    .webchat__suggested-action__text,
    .webchat__send-box-text-box__input {
        font-size: 15px !important;
    }
}