.sg-cookie-consent-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 1210;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.sg-cookie-consent-banner.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sg-cookie-consent-banner__content {
    max-width: 960px;
    margin: 0 auto;
    border-radius: 16px;
    padding: 24px 32px;
    background: rgba(17, 24, 39, 0.97);
    color: #fff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
}

.sg-cookie-consent-banner__top {
    margin-bottom: 16px;
}

.sg-cookie-consent-banner__top h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.sg-cookie-consent-banner__top p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.sg-cookie-consent-banner__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.sg-cookie-consent-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sg-cookie-consent-banner__links {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.sg-cookie-consent-banner__links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.sg-cookie-consent-banner__links a:hover {
    color: #fff;
}

.sg-cookie-consent-banner__links span {
    color: rgba(255, 255, 255, 0.3);
}

.sg-cookie-consent-btn {
    height: 38px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sg-cookie-consent-btn--main {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.sg-cookie-consent-btn--main:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
}

.sg-cookie-consent-btn--link {
    height: auto;
    padding: 0;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sg-cookie-consent-btn--link:hover {
    color: #fff;
}

.sg-cookie-consent-modal {
    position: fixed;
    inset: 0;
    z-index: 115;
    background: rgba(15, 23, 42, 0.6);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.sg-cookie-consent-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.sg-cookie-consent-modal__dialog {
    width: min(720px, 100%);
    margin: 8vh auto 0;
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 32px 64px rgba(15, 23, 42, 0.24);
    transform: translateY(12px);
    transition: transform 0.18s ease;
}

.sg-cookie-consent-modal.is-visible .sg-cookie-consent-modal__dialog {
    transform: translateY(0);
}

.sg-cookie-consent-modal__header,
.sg-cookie-consent-modal__footer {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sg-cookie-consent-modal__header {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.sg-cookie-consent-modal__header h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.sg-cookie-consent-modal__header p {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
}

.sg-cookie-consent-modal__close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.sg-cookie-consent-modal__body {
    padding: 10px 24px 0;
}

.sg-cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.sg-cookie-category:last-child {
    border-bottom: 0;
}

.sg-cookie-category__text h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.sg-cookie-category__text p {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
}

.sg-cookie-switch {
    position: relative;
    width: 54px;
    height: 30px;
    flex-shrink: 0;
}

.sg-cookie-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sg-cookie-switch span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d1d5db;
    transition: background 0.2s ease;
}

.sg-cookie-switch span::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.sg-cookie-switch input:checked + span {
    background: #111827;
}

.sg-cookie-switch input:checked + span::after {
    transform: translateX(24px);
}

.sg-cookie-switch input:disabled + span {
    background: #111827;
    opacity: 0.55;
}

.sg-cookie-consent-modal__footer {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.sg-cookie-consent-modal__link {
    color: #ff4500;
    font-size: 14px;
    font-weight: 700;
}

/* 模态框内保存按钮样式（仅用于设置弹窗，非横幅） */
.sg-cookie-consent-btn--primary {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

@media (max-width: 768px) {
    .sg-cookie-consent-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .sg-cookie-consent-banner__content {
        padding: 18px 20px;
    }

    .sg-cookie-consent-banner__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sg-cookie-consent-modal__header,
    .sg-cookie-consent-modal__footer,
    .sg-cookie-category {
        flex-direction: column;
        align-items: stretch;
    }

    .sg-cookie-consent-modal {
        padding: 12px;
    }

    .sg-cookie-consent-modal__dialog {
        margin-top: 4vh;
    }
}
