﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

html, body {
    width: 100%;
    min-height: 100vh;
}

/* ===================== 底部Cookie提示栏（缩小版） ===================== */
.cookie-privacy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 10px 16px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 16px;
}

    .cookie-privacy-bar.hidden {
        display: none;
    }

.privacy-text {
    flex: 1;
    font-size: 14px;
    color: #111111;
    line-height: 1.4;
}

    .privacy-text a {
        color: #000000;
        text-decoration: underline;
        margin-left: 4px;
    }

.btn-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-settings {
    font-size: 16px;
    color: #111;
    text-decoration: underline;
    background: transparent;
    border: none;
    cursor: pointer;
}

.btn-decline {
    font-size: 16px;
    padding: 6px 16px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 2px;
    cursor: pointer;
    color: #000;
}

.btn-accept {
    font-size: 16px;
    padding: 6px 18px;
    background: #000;
    border: 2px solid #000;
    border-radius: 2px;
    cursor: pointer;
    color: #fff;
}

.btn-close {
    font-size: 26px;
    line-height: 1;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #000;
    padding: 0 2px;
}

body.bar-open {
    padding-bottom: 90px;
}

/* ===================== 全屏遮罩 ===================== */
.cookie-modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .cookie-modal-mask.show {
        opacity: 1;
        visibility: visible;
    }

/* ===================== 弹窗主体（宽度缩小+紧凑高度） ===================== */
.cookie-set-modal {
    background: #fff;
    width: min(95%, 720px);
    max-height: 78vh;
    overflow-y: auto;
    border: 1px solid #999;
    position: relative;
    transform: translateY(120vh);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cookie-modal-mask.show .cookie-set-modal {
    transform: translateY(0);
}

/* 弹窗右上角关闭叉号 */
.modal-close-top {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
}

/* 弹窗标题区域 */
.modal-header {
    padding: 18px 20px 12px;
    border-bottom: 1px solid #dddddd;
}

    .modal-header h2 {
        font-size: 26px;
        font-weight: normal;
        color:#000000

    }
.cookie-modal-mask h2 {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}
.cookie-modal-mask p {
    margin:0px !important
}
    /* 单行Cookie选项容器（内边距缩小） */
    .cookie-item {
        padding: 14px 20px;
        border-bottom: 1px solid #dddddd;
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
    }

.cookie-text-wrap {
    flex: 1;
}

    .cookie-text-wrap h3 {
        font-size: 19px;
        font-weight: normal;
        margin-bottom: 6px !important;
        margin-top:0px !important;
        color:#000
    }

    .cookie-text-wrap p {
        font-size: 14px;
        color: #222;
        line-height: 1.45;
    }

/* ===================== 缩小版开关结构 ===================== */
.toggle-wrap {
    width: 76px;
    height: 40px;
    position: relative;
    flex-shrink: 0;
    margin-top: 3px;
    cursor: pointer;
}
/* 轨道固定底色 */
.toggle-bg {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background-color: #aaa;
    position: absolute;
    top: 0;
    left: 0;
    transition: background-color 0.25s ease;
    z-index: 1;
}
/* 滑块 */
.toggle-circle {
    width: 34px;
    height: 34px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid #999;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
    position: absolute;
    top: 3px;
    left: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #444;
    transition: transform 0.25s ease;
    z-index: 2;
}
/* 透明输入框置顶，保证点击生效 */
.toggle-input {
    width: 100%;
    height: 100%;
    position: absolute;
    margin: 0;
    padding: 0;
    opacity: 0;
    z-index: 10;
    cursor: pointer;
}
/* 默认关闭内容减号 */
.toggle-circle::after {
    content: "−";
}

/* 勾选样式切换 */
.toggle-input:checked ~ .toggle-bg {
    background-color: #000;
}

.toggle-input:checked ~ .toggle-circle {
    transform: translateX(36px);
    color: #000;
}

    .toggle-input:checked ~ .toggle-circle::after {
        content: "✓";
    }

/* 禁用样式 */
.toggle-disabled {
    pointer-events: none;
    cursor: default;
}

    .toggle-disabled .toggle-bg {
        background-color: #e6e9ec !important;
    }

/* 底部Save按钮区域（缩小） */
.modal-footer {
    padding: 16px 20px 22px;
    text-align: right;
}

.btn-save-setting {
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 10px 40px;
    font-size: 18px;
    cursor: pointer;
}

/* ===================== 移动端自适应 ===================== */
@media (max-width: 992px) {
    .cookie-privacy-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 10px 14px;
    }

    .btn-group {
        flex-wrap: wrap;
        gap: 10px;
    }

    .btn-settings,
    .btn-decline,
    .btn-accept {
        font-size: 14px;
        padding: 5px 14px;
    }

    .btn-close {
        font-size: 24px;
    }

    .privacy-text {
        font-size: 12px;
    }

    .modal-header h2 {
        font-size: 22px;
    }

    .cookie-text-wrap h3 {
        font-size: 17px;
    }

    .cookie-text-wrap p {
        font-size: 13px;
    }

    .toggle-wrap {
        width: 68px;
        height: 36px;
    }

    .toggle-circle {
        width: 30px;
        height: 30px;
    }

    .toggle-input:checked ~ .toggle-circle {
        transform: translateX(32px);
    }
}
