@charset "utf-8";

/* bootstrap と併せて使用すること */
.radio-range:has(input[type="radio"]:checked) {
    color: var(--gk-primary);
}

.radio-range:has(input[type="radio"]:not(:checked)) {
    color: var(--bs-gray-dark);
}

/* 〇ボタン デザイン */
input[type="radio"].radio-001 {
    opacity: 0;
    filter: alpha(opacity=0);
    position: absolute;
    cursor: pointer;
    outline: none;
}
input[type="radio"].radio-001 + span {
    position: relative;
    padding-left: 22px;
    display: inline-block;
    cursor: pointer;
}

input[type="radio"].radio-001 + span::before,
input[type="radio"].radio-001 + span::after {
    border-radius: 50%;
    content: '';
}

input[type="radio"].radio-001 + span::before {
    position: absolute;
    top: 1px;
    left: 0px;
    width: 18px;
    height: 18px;
    border-width: 2px;
    border-style: solid;
    border-color: #dee5eb;
    box-sizing: border-box;
}

input[type="radio"].radio-001 + span::after {
    position: absolute;
    top: 10px;
    left: 9px;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    background-color: #dee5eb;
}

input[type="radio"].radio-001:checked + span::after {
    background-color: #4fc3d9;
    animation: anim-radio-001 .3s linear;
}

input[type="radio"].radio-001:checked .border {
    background-color: white;
    border-color: #33CCE0 !important;
}

@keyframes anim-radio-001 {
    0% { box-shadow: 0 0 0 1px transparent; }
    50% { box-shadow: 0 0 0 10px #4fc3d933; }
    100% { box-shadow: 0 0 0 10px transparent; }
}

/* bootstrap と併せて使用すること */
/* How to use 

*/
.radio-002 div:has(input[type="radio"]:checked) {
    color: var(--gk-primary);
}

.radio-002 div:has(input[type="radio"]:not(:checked)) {
    color: var(--bs-gray-dark);
}

.radio-002 div:has(input[type="radio"]:disabled) {
    background-color: var( --bs-secondary-bg );
    cursor: default;
}
.radio-002 label:has(input[type="radio"]:disabled ) {
    cursor: default;
}


/* 〇ボタン デザイン */
.radio-002 {
    display: flex;
    flex-wrap: wrap;
    gap: .3em 2em;
    border: none;
}

    .radio-002 label {
        display: flex;
        align-items: center;
        gap: 0 .5em;
        position: relative;
        cursor: pointer;
    }


        .radio-002 label::before,
        .radio-002 label::after {
            border-radius: 50%;
            content: '';
        }

        .radio-002 label::before {
            width: 18px;
            height: 18px;
            border-width: 2px;
            border-style: solid;
            border-color: #dee5eb;
            box-sizing: border-box;
        }

        .radio-002 label::after {
            position: absolute;
            top: 50%;
            left: 9px;
            transform: translate(-50%, -50%);
            width: 9px;
            height: 9px;
            background-color: #dee5eb;
        }

        .radio-002 label:has(:checked)::after {
            background-color: #4fc3d9;
            animation: anim-radio-002 .3s linear;
        }

    .radio-002 .border:has(:checked) {
        background-color: white;
        border-color: #33CCE0 !important;
    }

    .radio-002 .border:has(:focus) {
        background-color: white;
        border-color: #0176cb !important;
    }

@keyframes anim-radio-002 {
    0% {
        box-shadow: 0 0 0 1px transparent;
    }

    50% {
        box-shadow: 0 0 0 10px #4fc3d933;
    }

    100% {
        box-shadow: 0 0 0 10px transparent;
    }
}

.radio-002 input {
    opacity: 0;
    position: absolute;
}



/* 〇ボタン デザイン */
.radio-003 {
    display: flex;
    flex-wrap: wrap;
    gap: .3em 2em;
    border: none;
}

    .radio-003 label {
        display: flex;
        align-items: center;
        gap: 0 .5em;
        position: relative;
        cursor: pointer;
    }

        .radio-003 label::before,
        .radio-003 label::after {
            border-radius: 50%;
            content: '';
        }

        .radio-003 label::before {
            width: 18px;
            height: 18px;
            border-width: 2px;
            border-style: solid;
            border-color: #dee5eb;
            box-sizing: border-box;
            position: absolute;
            top: 50%;
            left: 0;
            transform: translateY(-50%);
        }

        .radio-003 label::after {
            position: absolute;
            top: 50%;
            left: 9px;
            transform: translate(-50%, -50%);
            width: 9px;
            height: 9px;
            background-color: #dee5eb;
        }

        .radio-003 label:has(:checked)::after {
            background-color: #4fc3d9;
            animation: anim-radio-003 .3s linear;
        }

    .radio-003 .border:has(:checked) {
        background-color: white;
        border-color: #33CCE0 !important;
    }

    .radio-003 .border:has(:focus) {
        background-color: white;
        border-color: #0176cb !important;
    }

@keyframes anim-radio-003 {
    0% {
        box-shadow: 0 0 0 1px transparent;
    }

    50% {
        box-shadow: 0 0 0 10px #4fc3d933;
    }

    100% {
        box-shadow: 0 0 0 10px transparent;
    }
}

.radio-003 input {
    opacity: 0;
    position: absolute;
    z-index: -1; /* ラジオボタンを非表示にするための修正 */
}

/* テキストを右にずらす */
.radio-003 label span {
    margin-left: 1.5em;
}