/* =====================================================================
 * cookie.css — Cookie Consent Banner & Settings Panel
 * 风格遵循项目规范：Montserrat / --primary #424ad2 / 圆角 5px / 简洁 B2B
 * ===================================================================== */

/* ── body padding transition（防止内容被banner遮挡）── */
body {
    transition: padding-bottom 0.35s ease;
}

/* ── Banner（底部固定横幅）── */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: #1a1a1a;
    border-top: 3px solid var(--primary);
    padding: 20px 24px;
    display: none;
    animation: cookieSlideUp 0.35s ease-out;
}

@keyframes cookieSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

.cookie-content {
    flex: 1;
    font-size: 14px;
    color: #c8c8c8;
    line-height: 1.7;
}

.cookie-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.cookie-content a:hover {
    text-decoration: underline;
}

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

/* 通用按钮基础 */
.cookie-btn {
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

/* Accept All — 主色填充 */
.cookie-btn.accept {
    background-color: var(--primary);
    color: #fff;
}
.cookie-btn.accept:hover {
    opacity: 0.88;
}

/* Cookie Settings — 轮廓风格 */
.cookie-btn.setting {
    background-color: transparent;
    color: #c8c8c8;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.cookie-btn.setting:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Reject All — 低调灰色 */
.cookie-btn.reject {
    background-color: rgba(255, 255, 255, 0.08);
    color: #c8c8c8;
}
.cookie-btn.reject:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* 关闭按钮 × */
.cookie-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #888;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}
.cookie-close:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* ── Settings Panel（从底部滑出）── */
.cookie-settings {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    background-color: #fff;
    border-top: 3px solid var(--primary);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    padding: 24px;
    display: none;
    animation: cookieSlideUp 0.3s ease-out;
}

.settings-modal {
    max-width: 1400px;
    margin: 0 auto;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.settings-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.01em;
}

.settings-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 16px;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}
.settings-close:hover {
    color: var(--primary);
    background-color: rgba(66, 74, 210, 0.07);
}

.settings-desc {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 18px;
}

.cookie-options {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    min-width: 190px;
}

.cookie-option input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}
.cookie-option input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-option strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.cookie-option span {
    font-size: 12px;
    color: var(--text-color);
    line-height: 1.5;
}

.settings-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border-gray);
    padding-top: 16px;
}

/* Cancel */
.cancel-btn {
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 5px;
    border: 1px solid var(--border-gray);
    background: #fff;
    color: var(--text-color);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}
.cancel-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* Save Preferences */
.save-btn {
    font-family: "Montserrat", sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 5px;
    border: none;
    background-color: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
}
.save-btn:hover { opacity: 0.88; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .cookie-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .cookie-actions { width: 100%; flex-wrap: wrap; }
    .cookie-close { align-self: flex-end; margin-top: -60px; }
}

@media (max-width: 600px) {
    .cookie-btn { padding: 8px 14px; font-size: 12px; }
    .cookie-options { flex-direction: column; gap: 14px; }
    .settings-modal { width: 100%; }
}
