/* ----- クッキー同意バナー ---------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    max-width: calc(100% - 40px);
    background: #F8F9FA;
    color: #222;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 1000;
}
/* リンク */
.cookie-banner a,
.modal-overlay a {
    color: #3386d9;
    text-decoration: underline;
}
/* ボタン周り */
.cookie-buttons {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}
/* ボタン共通 */
.cookie-buttons button {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
/* 各種ボタン */
#reject {
    background-color: #555;
    color: #fff;
}
#accept {
    background-color: #986D41;
    color: #fff;
}

/* モバイル対応 */
@media (max-width: 480px) {
    .cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-width: none;
    }
}

/* ----- クッキー設定モーダル ---------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity .5s ease;
}
.modal-overlay.is-closing {
    opacity: 0;
}
.modal {
    background: #F8F9FA;
    width: 870px;
    max-width: 90%;
    max-height: 76vh;
    overflow-y: auto;
    padding: 32px;
    border-radius: 8px;
    position: relative;
}
.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 22px;
    cursor: pointer;
}
.modal h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 500;
}
.cookie-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ededed;
    padding: 16px 20px;
    margin-top: 20px;
    border-radius: 6px;
}
.cookie-section p.heading {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 3px;
}
.toggle {
    position: relative;
    min-width: 50px;
    height: 26px;
}
.toggle input {
    display: none;
}
.toggle input:disabled + .slider {
    cursor: not-allowed;
}
.slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 26px;
    transition: 0.3s;
    cursor: pointer;
}
.slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle input:checked+.slider { /* inputがcheckedの場合に直近の.sliderを変更する */
    background: #986D41;
}
.toggle input:checked+.slider::before { /* inputがcheckedの場合に〇部分を右へスライド */
    transform: translateX(24px);
}
.modal-footer {
    text-align: center;
}
.save-btn {
    display: inline-block;
    margin-top: 28px;
    padding: 10px 24px;
    font-size: 16px;
    color: #fff;
    background: #986D41;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.save-btn:hover {
    opacity: 0.85;
}

@media (max-width:768px) {
    .modal {
        font-size: 14px;
        padding: 25px;
        max-height: 50vh;
    }
    .modal h2 {
        font-size: 20px;
        margin-bottom: 13px;
    }
    .cookie-section {
        margin-top: 15px;
    }
    .cookie-section p.heading {
        font-size: 15px;
    }
    .save-btn {
        margin-top: 20px;
        padding: 7px 17px;
    }
}

/* ----- クッキー設定後メッセージ表示（toast） ---------------------------------- */
.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #986D41;
    color: #fff;
    padding: 14px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: .3s;
    z-index: 1000;
}
.toast.is-show {
    opacity: 1;
    transform: translateY(0);
}