/* Cookie 同意管理器：底部横条，右侧三个等宽按钮 */

.cc-overlay {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 2147483000;
    background: #ffffff;
    border-top: 1px solid #dfe3ea;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.12);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    box-sizing: border-box;
}

.cc-overlay *,
.cc-overlay *::before,
.cc-overlay *::after {
    box-sizing: border-box;
}

.cc-panel {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: 1440px;
    max-height: 72vh;
    margin: 0 auto;
    padding: 20px 56px 22px 32px;
    overflow-y: auto;
    color: #1b2230;
    line-height: 1.6;
    font-size: 13px;
}

.cc-content {
    flex: 1 1 auto;
    min-width: 0;
}

.cc-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    color: #1b2230;
}

.cc-desc {
    margin: 0 0 6px;
    color: #5b626c;
    font-size: 13px;
}

.cc-policy-link {
    display: inline-block;
    color: #910010;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-policy-link:hover,
.cc-policy-link:focus {
    color: #78000d;
}

.cc-prefs {
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid #dfe3ea;
    border-radius: 4px;
    background: #f8faf9;
}

.cc-prefs[hidden] {
    display: none;
}

.cc-hint {
    margin: 0 0 8px;
    color: #5b626c;
}

.cc-category {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid #e8ebf0;
    cursor: pointer;
}

.cc-category input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: #0a6b4f;
}

.cc-category input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.cc-category-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.cc-category-name {
    font-weight: 600;
    color: #1b2230;
}

.cc-category-desc {
    color: #6a717b;
    font-size: 12px;
}

.cc-required {
    flex: 0 0 auto;
    color: #6a717b;
    font-size: 12px;
    white-space: nowrap;
}

.cc-side {
    position: relative;
    flex: 0 0 260px;
    width: 260px;
}

.cc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cc-btn {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #910010;
    border-radius: 2px;
    background: #910010;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.cc-btn-outline {
    background: #ffffff;
    color: #910010;
}

.cc-btn:hover,
.cc-btn:focus {
    background: #78000d;
    border-color: #78000d;
    color: #ffffff;
    outline: none;
}

.cc-btn-outline:hover,
.cc-btn-outline:focus {
    background: #fbeeef;
    color: #78000d;
    border-color: #910010;
}

.cc-btn:active {
    background: #62000a;
}

.cc-close {
    position: absolute;
    right: -38px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6a717b;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.cc-close:hover,
.cc-close:focus {
    color: #1b2230;
}

.cc-prefs .cc-btn {
    width: auto;
    min-width: 170px;
    margin-top: 12px;
}

.cc-error {
    color: #a31621;
    font-size: 12px;
}

.cc-toast {
    position: fixed;
    right: 24px;
    top: 24px;
    left: auto;
    bottom: auto;
    z-index: 2147483001;
    padding: 12px 18px;
    border-radius: 4px;
    background: #910010;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cc-settings-link,
.cc-manage-btn {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-policy-placeholder {
    padding: 18px 20px;
    margin: 20px 0;
    border: 1px dashed #c2c8d2;
    border-radius: 8px;
    background: #f8f9fb;
    color: #596273;
}

.cc-policy-table-wrap {
    overflow-x: auto;
    margin: 16px 0 28px;
}

.cc-policy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.55;
}

.cc-policy-table th,
.cc-policy-table td {
    padding: 10px 12px;
    border: 1px solid #dfe3ea;
    text-align: left;
    vertical-align: top;
}

.cc-policy-table th {
    background: #f2f4f7;
    font-weight: 600;
    white-space: nowrap;
}

.cc-policy-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 16, 24, 0.62);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
    box-sizing: border-box;
}

.cc-policy-modal *,
.cc-policy-modal *::before,
.cc-policy-modal *::after {
    box-sizing: border-box;
}

.cc-policy-modal-panel {
    width: 100%;
    max-width: 860px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.cc-policy-modal-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e8ebf0;
}

.cc-policy-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1b2230;
}

.cc-policy-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 6px;
    background: #f2f4f7;
    color: #1b2230;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.cc-policy-modal-close:hover,
.cc-policy-modal-close:focus {
    background: #e4e8ee;
}

.cc-policy-body {
    padding: 24px 50px;
    overflow-y: auto;
    color: #1b2230;
    font-size: 15px;
    line-height: 1.75;
}

.cc-policy-body img {
    max-width: 100%;
    height: auto;
}

.cc-policy-body table {
    max-width: 100%;
    border-collapse: collapse;
}

.cc-policy-body td,
.cc-policy-body th {
    border: 1px solid #dfe3ea;
    padding: 8px 10px;
}

@media (max-width: 640px) {
    .cc-panel {
        flex-direction: column;
        gap: 16px;
        max-height: 86vh;
        padding: 18px 20px 20px;
    }

    .cc-side {
        flex: 0 0 auto;
        width: 100%;
    }

    .cc-close {
        right: 4px;
        top: 4px;
        transform: none;
    }

    .cc-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .cc-btn {
        min-height: 42px;
    }

    .cc-policy-modal {
        padding: 0;
        align-items: flex-end;
    }

    .cc-policy-modal-panel {
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
    }
}
