@charset "UTF-8";

.gaisanbot {
    position: fixed;
    width: 375px;
    height: 670px;
    background-color: var(--white);
    border-radius: 13.5901px;
    border: solid 2px var(--blue);
    box-shadow: 4.53px 4.53px 4.53px rgba(0,0,0,0.5);
    right: 0;
    z-index: 200;
    top: 3.8rem;
    transition: all 0.5s ease;
    right: -375px; /* 初期状態では画面外に配置 */
}
.gaisanbot.open {
    right: 0; /* openクラスが付与されたら画面内にスライドイン */
}

.gaisanbot__head {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 50px;
    background-color: var(--blue);
    color: var(--white);
    padding: 0 14px;
    font-size: 20px;
    font-weight: var(--font-weight__bold);
}

.gaisanbot__head-icon {
    width: 25.963px;
    margin-right: 9.7px;
}

.gaisanbot__head-icon img {
    display: block;
}

.gaisanbot__head-close {
    display: block;
    position: relative;
    width: 50px;
    height: 50px;
    margin-left: auto;
}

.gaisanbot__head-close::before,
.gaisanbot__head-close::after {
    content: "";
    display: block;
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: var(--white);
    top: 0;
    bottom: 0;
    right: 0;
    margin: auto;
}

.gaisanbot__head-close::before {
    transform: rotate(-45deg);
}

.gaisanbot__head-close::after {
    transform: rotate(45deg);
}

.gaisanbot__title {
    padding-top: 25px;
    text-align: center;
}

.gaisanbot__h2 {
    font-size: 24px;
    text-align: center;
    font-weight: var(--font-weight__bold);
    color: var(--blue);
    display: inline-block;
    position: relative;
    line-height: 1;
    padding-bottom: 8px;
    margin-bottom: 28px;
}

.gaisanbot__h2::after {
    content: "";
    width: calc(100% + 26px);
    height: 3px;
    background-color: var(--blue);
    display: block;
    position: absolute;
    left: -13px;
    bottom: 0;
}

.gaisanbot__content {padding: 0 35px;}

.gaisanbot__item {
    padding-bottom: 14px;
}

.gaisanbot__label {
    display: block;
    font-size: 17px;
    font-weight: var(--font-weight__bold);
    line-height: 34px;
}

.gaisanbot__input {
    display: block;
    width: 100%;
    height: 45px;
    appearance: none;
    border: solid 1px var(--black);
    background-color: var(--gray4);
    font-size: 18px;
    line-height: 43px;
    padding: 0 8px;
}

.gaisanbot__btn {
    padding-top: 27px;
}

.gaisanbot__next-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 40px;
    background-color: var(--blue);
    color: var(--white);
    font-size: 16px;
    font-weight: var(--font-weight__bold);
    margin: 0 auto;
}
.gaisanbot__next-btn.calc-btn {
    width: 112px;
}

/* 元のラジオボタンは非表示にする */
.gaisanbot__radio-input {
    display: none;
}

/* ラベル（ボタンの見た目） */
.gaisanbot__radio-label {
    display: flex;
    align-items: center; /* 垂直方向中央揃え */
    width: 100%;
    height: 45px; /* inputと同じ高さに設定 */
    padding: 0 14px; /* 横の余白 */
    margin-bottom: 15px; /* ボタン同士の間隔 */
    background-color: var(--gray4); /* 未選択時の背景色 */
    border: solid 1px var(--black); /* 枠線 */
    font-size: 16px;
    letter-spacing: -0.05em;
    line-height: 1.2;
    font-weight: var(--font-weight__bold);
    color: var(--black);
    cursor: pointer;            /* マウスを指マークにする */
    user-select: none;          /* テキスト選択を無効化（カーソルが出ないようにする） */
    -webkit-user-select: none;  /* Safari/Chrome用 */
    transition: all 0.2s ease;
    box-sizing: border-box; /* paddingを含めたサイズ計算 */
}
.gaisanbot__radio-label:last-of-type {
    margin-bottom: 10px;
}

/* 四角いチェックボックス部分 (::beforeを使用) */
.gaisanbot__radio-label::before {
    content: "";
    display: block;
    width: 20px;  /* 四角の幅 */
    height: 20px; /* 四角の高さ */
    background-color: var(--white);
    border: solid 1px var(--black); /* 四角の枠線（画像の四角の太さに合わせるなら2pxでも可） */
    margin-right: 14px; /* テキストとの距離 */
    flex-shrink: 0; /* 四角が潰れないようにする */
    
    /* 画像表示の設定（初期は画像なし） */
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80%; /* チェックマークのサイズ調整 */
}

/* --- 選択された状態 (Checked) --- */

/* 選択時の背景と文字色 */
.gaisanbot__radio-input:checked + .gaisanbot__radio-label {
    background-color: var(--blue);
    color: var(--white);
    border-color: var(--blue); /* 枠線も青にする場合 */
}

/* 選択時のチェックボックス（四角）の中に画像を表示 */
.gaisanbot__radio-input:checked + .gaisanbot__radio-label::before {
    /* ここにチェックマーク画像のパスを指定してください */
    background-image: url("../images/gaisanbot__check.png"); 
    
    /* もし画像が assets/images フォルダにある場合は以下のように修正してください
    background-image: url("assets/images/gaisan__check.png");
    */
}

.gaisanbot__note {
    font-size: 15px;
    line-height: 26px;
}

/* P5の入力フォーム周り調整 */
.gaisanbot__input-group-area {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gaisanbot__unit {
    font-size: 18px;
    font-weight: bold;
}
.gaisanbot__separator {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid #ccc;
}


.gaisanbot__result-price {
    font-size: 53px;
    font-weight: var(--font-weight__bold);
    line-height: 1;
    padding-top: 22px;
    position: relative;
    padding-bottom: 30px;
}

.gaisanbot__result-price::after {
    content: "";
    display: block;
    position: absolute;
    width: 300px;
    height: 0.6px;
    background-color: var(--black);
    bottom: 0;
}

.gaisanbot__result-price .unit {
    font-size: 12px;
    font-weight: var(--font-weigth__regular);
}

.gaisanbot__result-details {
    padding-top: 16px;
    padding-left: 4px;
    padding-bottom: 22px;
}

.gaisanbot__result-details dl {
    display: flex;
    justify-content: space-between;
    line-height: 34px;
    font-size: 17px;
}

.gaisanbot__result-btn-link {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 300px;
    height: 45px;
    text-decoration: unset;
    margin-bottom: 16px;
    padding-left: 58px;
}

.blue .gaisanbot__result-btn-link {
    background-color: var(--blue);
    border: solid 1px var(--blue);
    color: var(
    --white);
    font-size: 19.2px;
    font-weight: var(--font-weight__bold);
}

.gray .gaisanbot__result-btn-link {
    background-color: var(--gray4);
    border: solid 1px var(    --gray5);
    color: var(--blue);
    font-family: var(--font-oswald);
    font-size: 26px;
    font-weight: var(--font-weight__bold);
}

.gaisanbot__result-btn-icon {
    width: 35.3123px;
    margin-right: 7.5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gaisanbot__result-btn-text {
    width: 155px;
    text-align: center;
}

.gaisanbot__result-note {
    font-size: 16px;
    line-height: 27px;
    letter-spacing: -0.05em;
}


@media screen and (max-width: 768px) {
    .gaisanbot.open {
        right: calc((100vw - 375px)/ 2);
    }
}