/**
 * 隐私协议和Cookie同意弹窗样式
 * Privacy Banner & Cookie Consent Styles
 */

/* 基础弹窗容器 */
.bellwood-privacy-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 999999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.bellwood-privacy-banner.show {
    transform: translateY(0);
}

/* 位置变体 */
.bellwood-privacy-bottom {
    bottom: 0;
    border-top: 3px solid #3498db;
}

.bellwood-privacy-top {
    top: 0;
    border-bottom: 3px solid #3498db;
    transform: translateY(-100%);
}

.bellwood-privacy-top.show {
    transform: translateY(0);
}

.bellwood-privacy-center {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 600px;
    border-radius: 12px;
    border: 3px solid #3498db;
    opacity: 0;
}

.bellwood-privacy-center.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* 弹窗内容容器 */
.privacy-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.bellwood-privacy-center .privacy-banner-container {
    flex-direction: column;
    text-align: center;
}

/* 内容区域 */
.privacy-banner-content {
    flex: 1;
    min-width: 300px;
}

.privacy-banner-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.privacy-banner-text {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #ecf0f1;
}

.privacy-banner-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.privacy-link {
    color: #3498db !important;
    text-decoration: underline;
    font-size: 13px;
    transition: color 0.2s ease;
}

.privacy-link:hover {
    color: #5dade2 !important;
}

/* 按钮区域 */
.privacy-banner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.privacy-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.privacy-btn-primary {
    background: #3498db;
    color: #ffffff;
}

.privacy-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.privacy-btn-secondary {
    background: transparent;
    color: #bdc3c7;
    border: 1px solid #34495e;
}

.privacy-btn-secondary:hover {
    background: #34495e;
    color: #ffffff;
    border-color: #3498db;
}

/* Cookie设置模态框 */
.privacy-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.privacy-settings-modal.show {
    opacity: 1;
    visibility: visible;
}

.privacy-settings-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.privacy-settings-modal.show .privacy-settings-content {
    transform: scale(1);
}

/* 模态框头部 */
.privacy-settings-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.privacy-settings-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 22px;
    font-weight: 600;
}

.privacy-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.privacy-close-btn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

/* 模态框主体 */
.privacy-settings-body {
    padding: 20px 30px;
}

.privacy-settings-body > p {
    margin: 0 0 25px 0;
    color: #34495e;
    line-height: 1.6;
}

/* Cookie类别 */
.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #ecf0f1;
    border-radius: 8px;
    background: #f8f9fa;
}

.cookie-category-header {
    margin-bottom: 10px;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 15px;
}

.cookie-toggle input[type="checkbox"] {
    display: none;
}

/* 自定义开关样式 */
.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #bdc3c7;
    border-radius: 26px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .toggle-slider {
    background: #3498db;
}

.cookie-toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .toggle-slider {
    background: #27ae60;
    opacity: 0.7;
}

.cookie-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.cookie-description {
    margin: 0;
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
    margin-left: 65px;
}

/* 模态框底部 */
.privacy-settings-footer {
    padding: 20px 30px 25px;
    border-top: 1px solid #ecf0f1;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* 背景遮罩（中央弹窗时） */
.bellwood-privacy-center ~ .privacy-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.bellwood-privacy-center.show ~ .privacy-banner-overlay {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .privacy-banner-container {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .privacy-banner-content {
        text-align: center;
        min-width: auto;
    }
    
    .privacy-banner-title {
        font-size: 18px;
    }
    
    .privacy-banner-text {
        font-size: 13px;
    }
    
    .privacy-banner-actions {
        justify-content: center;
        width: 100%;
    }
    
    .privacy-btn {
        flex: 1;
        min-width: 100px;
    }
    
    .privacy-banner-links {
        justify-content: center;
    }
    
    .privacy-settings-content {
        margin: 10px;
        max-height: 90vh;
    }
    
    .privacy-settings-header,
    .privacy-settings-body,
    .privacy-settings-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .privacy-settings-footer {
        flex-direction: column;
    }
    
    .cookie-description {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .bellwood-privacy-center {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .privacy-banner-actions {
        flex-direction: column;
    }
    
    .privacy-btn {
        width: 100%;
    }
    
    .privacy-settings-header h3 {
        font-size: 20px;
    }
}

/* 深色主题适配 */
@media (prefers-color-scheme: dark) {
    .privacy-settings-content {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .privacy-settings-header {
        border-bottom-color: #34495e;
    }
    
    .privacy-settings-header h3 {
        color: #ecf0f1;
    }
    
    .privacy-settings-footer {
        border-top-color: #34495e;
    }
    
    .cookie-category {
        background: #34495e;
        border-color: #34495e;
    }
    
    .cookie-title {
        color: #ecf0f1;
    }
    
    .cookie-description {
        color: #bdc3c7;
    }
    
    .privacy-settings-body > p {
        color: #bdc3c7;
    }
}

/* 动画效果 */
@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 无障碍支持 */
.privacy-btn:focus,
.privacy-link:focus,
.privacy-close-btn:focus,
.cookie-toggle:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .bellwood-privacy-banner {
        border: 2px solid #ffffff;
    }
    
    .privacy-btn-secondary {
        border-width: 2px;
    }
    
    .cookie-category {
        border-width: 2px;
    }
} 