/* ----------------------------------------------- */
/* ---------------------分類背景色------------------- */

/* 分類1: コーンフラワーブルー */
.bg-group-1 {
    background-color: rgba(100, 149, 237, 0.1) !important;
}

/* 分類2: ティールグリーン */
.bg-group-2 {
    background-color: rgba(64, 196, 170, 0.1) !important;
}

/* 分類3: アンバー（落ち着いた黄） */
.bg-group-3 {
    background-color: rgba(255, 183, 77, 0.1) !important;
}

/* 分類4: ライラックパープル */
.bg-group-4 {
    background-color: rgba(149, 117, 205, 0.1) !important;
}

/* カスタムバッジ用の色クラス */
.custom-badge-group-1 {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #6495ed;
    color: white;
}

.custom-badge-group-2 {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #40c4aa;
    color: white;
}

.custom-badge-group-3 {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #ffb74d;
    color: white;
}

.custom-badge-group-4 {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    background-color: #9575cd;
    color: white;
}

/* ----------------------------------------------- */
/* ---------------------コンテナ------------------- */

/* コンテナ: 上下左右中央揃え */
.container_align_center {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* コンテナ: 上寄せ */
.container_align_top {
    min-height: 100vh;
}

/* コンテナ: ナビバー有 */
.container_main {
    padding-top: 100px;
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 120px;
}
@media (min-width: 768px) {
    .container_main {
        padding-top: 120px;
        padding-left: 50px;
        padding-right: 50px;
        padding-bottom: 120px;
    }
}
@media (min-width: 992px) {
    .container_main {
        padding-top: 130px;
        padding-left: 330px;
        padding-right: 330px;
        padding-bottom: 130px;
    }
}
@media (min-width: 1200px) {
    .container_main {
        padding-top: 130px;
        padding-left: 450px;
        padding-right: 450px;
        padding-bottom: 150px;
    }
}

.container_content {
    width: auto;
    background-color: white;
    border-radius: 10px;
}

/* コンテナ: ログイン画面, 登録画面用 */
.container_guest {
    height: 100%;
}

/* ナビゲーションバー全体 */
.navbar {
    padding: 20px;
}

/* ナビゲーションバートグルボタン */
.navbar-toggler {
    border: none;
}
.navbar-toggler:focus {
    border: none;
    box-shadow: none;
}

/* スマホ/タブレット時のナビゲーションメニュー */
@media (max-width: 992px) {
    .nav-item {
        padding: 15px;
        border-top: solid 1px lightgray;
    }
}

.footer {
    width: 100%;
    padding: 10px;
    background-color: white;
}

/* ----------------------------------------------- */
/* ---------------コンポーネント------------------- */

.box {
    width: 100%;
    max-width: 650px;
    min-height: 400px;
    padding: 15px;
    margin: auto;
    background-color: white;
    box-shadow: 0 0 8px lightgray;
}

.h_box {
    position: relative;
}

.h_box:before,
.h_box:after {
    content: "";
    position: absolute;
    top: 50%;
    display: inline-block;
    width: 10%;
    height: 1px;
    background-color: lightgray;
}

.h_box:before,
.h_box:before {
    left: 5%;
}
.h_box:after,
.h_box:after {
    right: 5%;
}

/* 必須ラベル */
.label_required {
    color: white;
    background: #cd5c5c;
    border-radius: 0.4em;
    min-width: 40px;
    max-height: 22px;
}

/* バリデーションエラーメッセージ表示 */
.h_form_err {
    color: #cd5c5c;
    font-size: small;
    font-weight: bold;
    text-align: left;
}

/* 入力フォーム */
.form-control:focus,
.form-select:focus {
    box-shadow: none;
    border-color: #6495ed;
}

/* 入力フォーム: バリデーションエラー時 */
.form-control.is-invalid,
.was-validated .form-control:invalid {
    background-color: #f8e0e0;
    box-shadow: none;
    border-color: #bd4147;
}

/* セレクトボックス: バリデーションエラー時 */
.form-select.is-invalid,
.was-validated .form-select:invalid {
    background-color: #f8e0e0;
    box-shadow: none;
    border-color: #bd4147;
}

/* バリデーションエラー時のフォーカス時 */
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: none !important;
    border-color: #bd4147;
}

.button_survey_list {
    min-height: 54px;
    min-width: 200px;
}

.button_return {
    min-width: 200px;
}

.accordion {
    --bs-accordion-btn-focus-border-color: transparent;
    --bs-accordion-btn-focus-box-shadow: none;

    --bs-accordion-active-color: var(--bs-body-color);
    --bs-accordion-active-bg: #9bbeff;

    --bs-accordion-btn-padding-y: 0.75rem;
    --bs-accordion-border-radius: 0.75rem;
}

/* 外枠：影を消しつつ、角丸を明示して子のはみ出しを切る */
.accordion-item {
    box-shadow: none !important;
    border: 1px solid lightgray !important;
    border-radius: 0.5rem !important; /* 好きな値に調整 */
    overflow: hidden; /* 角の欠け防止 */
}

/* ヘッダーのボタンにも角丸を継承させる（閉じている時） */
.accordion-button {
    border-radius: inherit !important;
}

/* 開いた時は下側の角だけフラットにする */
.accordion-button:not(.collapsed) {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* ラジオボタン */
.button_radio_answer {
    width: 40px;
    height: 40px;
    border: solid 2px #6495ed;
    border-radius: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: background-color 0.3s ease-in-out;
}

/* ラジオボタン: タブレット時のサイズ */
@media (max-width: 768px) {
    .button_radio_answer {
        width: 25px;
        height: 25px;
    }
}

.button_radio_answer:hover {
    background-color: #6495ed;
    box-shadow: none;
}

.button_radio_answer:checked,
.button_radio_answer:focus {
    background-color: #6495ed;
    box-shadow: none;
}

.button_radio_answer::before {
    content: "";
    display: block;
    width: 60%;
    height: 60%;
    margin: 20% auto;
    border-radius: 50%;
}

.button_radio_answer:checked:before {
    background: #6495ed;
}

.progress {
    width: 65%;
}

.table-borderless td,
.table-borderless th {
    border: none;
}

/* トースト */
#toast_download_fail,
#toast_download_success {
    position: fixed;
    top: 110px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 4px 4px 8px lightgray;
}

@media (max-width: 768px) {
    #toast_download_fail,
    #toast_download_success {
        width: 90%;
    }
}

#toast_download_fail.hide,
#toast_download_success.hide {
    opacity: 0;
    visibility: hidden;
    transition: 1s;
}

#toast_download_fail.show,
#toast_download_success.show {
    transition: 1s;
    opacity: 1;
    visibility: visible;
}

#btn_download,
#btn_download:disabled {
    transition: 1s;
}

/* 高さ400px、幅100%のコンテナ */
.responsive-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* ----------------------------------------------- */
/* ---------------------フォント------------------- */

.h_content {
    font-size: 1.5rem;
}

/* 説明文: タブレット時の文字サイズ */
@media (max-width: 992px) {
    .h_content {
        font-size: 1.2rem;
    }
}

/* 説明文: スマホ時の文字サイズ */
@media (max-width: 768px) {
    .h_content {
        font-size: 1rem;
    }
}

.h_subcontent {
    font-size: 1.2rem;
}

/* サブテキスト: スマホ時の文字サイズ */
@media (max-width: 768px) {
    .h_subcontent {
        font-size: 1rem;
    }
    .responsive-container {
        height: 300px;
    }
}

@media (max-width: 500px) {
    .responsive-container {
        height: 200px;
    }
}

.label_content {
    font-size: 1.2rem;
}

@media (max-width: 992px) {
    .label_content {
        font-size: 1rem;
    }
}

/* サブテキスト: スマホ時の文字サイズ */
@media (max-width: 768px) {
    .label_content {
        font-size: 0.9rem;
    }
    .responsive-container {
        height: 300px;
    }
}

@media (max-width: 500px) {
    .responsive-container {
        height: 200px;
    }
    .label_content {
        font-size: 0.7rem;
    }
}

.h_score_main {
    font-size: 2.5rem;
}

.h_score_sub {
    font-size: 1.7rem;
}

/* 管理者向けラベル */
.h_admin_nav {
    font-size: 1rem;
    padding: 5px 10px 5px 10px;
    background-color: #6495ed;
    border-radius: 5px;
    margin-right: auto !important;
    margin-left: 15px !important;
    color: white;
}

/* 管理者向けラベル: スマホ時の文字サイズ */
@media (max-width: 400px) {
    .h_admin_nav {
        font-size: 0.8rem;
        padding: 5px 7px 5px 7px;
        margin: 0 auto;
    }
}

/* ----------------------------------------------- */
/* ---------------トグルボタン-------------------- */

.survey-toggle-wrapper {
    display: inline-block;
}

.survey-toggle-container {
    position: relative;
    display: inline-flex;
    background-color: #f0f0f0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    padding: 3px;
    width: 160px;
    height: 38px;
}

.survey-toggle-btn {
    position: relative;
    flex: 1;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 2;
    border-radius: 0.2rem;
}

.survey-toggle-btn:hover {
    color: #495057;
}

.survey-toggle-btn.active {
    color: white;
}

.survey-toggle-btn:focus {
    outline: none;
}

.survey-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(50% - 3px);
    height: calc(100% - 6px);
    background-color: #6495ed;
    border-radius: 0.2rem;
    transition: transform 0.25s ease;
    z-index: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .survey-toggle-container {
        width: 140px;
        height: 36px;
    }

    .survey-toggle-btn {
        font-size: 0.8rem;
    }
}
