/**
 * 语言选择弹窗样式
 * 美式设计风格 - 底部横幅
 * 针对非中国大陆用户的语言选择
 */

/* 遮罩层 */
.cookie-consent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  backdrop-filter: blur(0.5px);
}

.cookie-consent-overlay.show {
  opacity: 1;
}

/* 弹窗容器 - 底部横幅 */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-top: 3px solid #2563eb;
}

.cookie-consent-banner.show {
  transform: translateY(0);
}

/* 内容容器 */
.cookie-consent-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

/* 图标区域 - 美式简洁风格 */
.cookie-consent-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cookie-consent-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #f0f4ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.cookie-consent-icon svg {
  width: 28px;
  height: 28px;
}

.cookie-consent-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}

/* 文本区域 */
.cookie-consent-text {
  flex: 1;
  min-width: 0;
}

.cookie-consent-text p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #4b5563;
  font-weight: 400;
}

.cookie-consent-link {
  font-size: 15px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  margin-left: 8px;
  white-space: nowrap;
  transition: color 0.15s ease;
  border-bottom: 2px solid transparent;
}

.cookie-consent-link:hover {
  color: #1d4ed8;
  border-bottom-color: #1d4ed8;
}

/* 按钮区域 - 美式风格 */
.cookie-consent-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-consent-btn {
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.cookie-consent-btn-primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  min-width: 160px;
}

.cookie-consent-btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.cookie-consent-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}

.cookie-consent-btn-secondary {
  background: transparent;
  color: #6b7280;
  border: 2px solid #d1d5db;
  padding: 12px 28px;
  font-weight: 600;
}

.cookie-consent-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #374151;
}

.cookie-consent-btn-secondary:active {
  background: #f3f4f6;
}

/* 平板适配 */
@media (max-width: 1024px) {
  .cookie-consent-content {
    padding: 20px 24px;
    gap: 20px;
  }

  .cookie-consent-icon {
    width: 44px;
    height: 44px;
  }

  .cookie-consent-icon svg {
    width: 26px;
    height: 26px;
  }

  .cookie-consent-title {
    font-size: 18px;
  }

  .cookie-consent-text p {
    font-size: 14px;
  }

  .cookie-consent-link {
    font-size: 14px;
  }

  .cookie-consent-btn {
    padding: 12px 28px;
    font-size: 14px;
  }

  .cookie-consent-btn-primary {
    min-width: 140px;
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .cookie-consent-content {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 18px;
  }

  .cookie-consent-header {
    gap: 14px;
  }

  .cookie-consent-icon {
    width: 40px;
    height: 40px;
  }

  .cookie-consent-icon svg {
    width: 24px;
    height: 24px;
  }

  .cookie-consent-title {
    font-size: 17px;
  }

  .cookie-consent-text p {
    font-size: 14px;
  }

  .cookie-consent-link {
    font-size: 14px;
    display: block;
    margin-left: 0;
    margin-top: 8px;
  }

  .cookie-consent-actions {
    justify-content: stretch;
    gap: 10px;
  }

  .cookie-consent-btn {
    flex: 1;
    padding: 14px 24px;
    font-size: 14px;
  }

  .cookie-consent-btn-primary {
    min-width: auto;
  }

  .cookie-consent-btn-secondary {
    padding: 12px 24px;
  }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
  .cookie-consent-banner {
    border-top-width: 2px;
  }

  .cookie-consent-content {
    padding: 18px 16px;
    gap: 16px;
  }

  .cookie-consent-header {
    gap: 12px;
  }

  .cookie-consent-icon {
    width: 36px;
    height: 36px;
  }

  .cookie-consent-icon svg {
    width: 22px;
    height: 22px;
  }

  .cookie-consent-title {
    font-size: 16px;
  }

  .cookie-consent-text p {
    font-size: 13px;
  }

  .cookie-consent-link {
    font-size: 13px;
  }

  .cookie-consent-actions {
    flex-direction: column;
    gap: 10px;
  }

  .cookie-consent-btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 13px;
  }

  .cookie-consent-btn-secondary {
    padding: 12px 20px;
  }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .cookie-consent-overlay {
    background: rgba(0, 0, 0, 0.25);
  }

  .cookie-consent-banner {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .cookie-consent-title {
    color: #f9fafb;
  }

  .cookie-consent-text p {
    color: #d1d5db;
  }

  .cookie-consent-link {
    color: #60a5fa;
  }

  .cookie-consent-link:hover {
    color: #93c5fd;
  }

  .cookie-consent-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  }

  .cookie-consent-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
  }

  .cookie-consent-btn-secondary {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
  }

  .cookie-consent-btn-secondary:hover {
    background: #4b5563;
    border-color: #6b7280;
  }

  .cookie-consent-btn-secondary:active {
    background: #6b7280;
  }
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent-overlay,
  .cookie-consent-banner {
    transition: none;
  }

  .cookie-consent-btn:hover {
    transform: none;
  }
}

/* 确保在所有页面上都显示在最顶层 */
.cookie-consent-banner {
  isolation: isolate;
}
