/**
 * Cookie 同意横幅与设置面板
 *
 * 只影响本模块的类名，不覆盖站点其他样式。
 */

.cookie-consent-banner {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    padding: 16px;
}

.cookie-consent-banner.is-visible {
    display: block;
}

.cookie-consent-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-consent-text {
    flex: 1 1 auto;
    margin: 0;
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-consent-policy {
    color: var(--primary-color, #0d6efd);
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.cookie-consent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
}

.cookie-consent-accept {
    background: var(--primary-color, #0d6efd);
    border-color: var(--primary-color, #0d6efd);
    color: #ffffff;
}

.cookie-consent-accept:hover {
    filter: brightness(0.92);
}

.cookie-consent-reject {
    background: #ffffff;
    border-color: #6c757d;
    color: #212529;
}

.cookie-consent-reject:hover {
    background: #f1f3f5;
}

.cookie-consent-link {
    background: none;
    border: 0;
    padding: 6px 4px;
    color: var(--primary-color, #0d6efd);
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.cookie-consent-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(0, 0, 0, 0.45);
    padding: 16px;
}

.cookie-consent-modal.is-visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-consent-dialog {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    padding: 24px;
}

.cookie-consent-title {
    margin: 0 0 16px;
    color: #212529;
    font-size: 20px;
    line-height: 1.4;
}

.cookie-consent-row {
    padding: 12px 0;
    border-top: 1px solid #e9ecef;
}

.cookie-consent-row-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #212529;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.cookie-consent-row-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    flex-shrink: 0;
}

.cookie-consent-row-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.cookie-consent-row-desc {
    margin: 6px 0 0 24px;
    color: #6c757d;
    font-size: 13px;
    line-height: 1.5;
}

.cookie-consent-hint {
    margin: 12px 0 0;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.5;
}

.cookie-consent-dialog .cookie-consent-actions {
    justify-content: flex-end;
    margin-top: 16px;
}

.cookie-consent-save {
    background: var(--primary-color, #0d6efd);
    border-color: var(--primary-color, #0d6efd);
    color: #ffffff;
}

.cookie-consent-save:hover {
    filter: brightness(0.92);
}

.cookie-consent-close {
    background: #ffffff;
    border-color: #6c757d;
    color: #212529;
}

.cookie-consent-close:hover {
    background: #f1f3f5;
}

.site-footer .cookie-settings-link {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

@media (max-width: 767px) {
    .cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .cookie-consent-actions {
        width: 100%;
    }

    .cookie-consent-actions .cookie-consent-btn {
        flex: 1 1 0;
    }

    .cookie-consent-dialog {
        padding: 20px;
    }

    .cookie-consent-dialog .cookie-consent-actions .cookie-consent-btn {
        flex: 1 1 auto;
    }
}
