/* Cookie管理组件样式 */

/* Cookie通知横幅 */
.cookie-notice-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: #fff;
  border-radius: 8px;
  z-index: 10000;
  /* padding: 20px; */
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0px -3px 14px 2px rgba(27, 39, 51, 0.04),0px -5px 14px -3px rgba(0, 0, 0, 0.1);
}

.cookie-notice-content-wrapper {
  width: 100%;
  /* max-width: 1200px; */
  display: flex;
  justify-content: center;
}

.cookie-notice-content {
  border-radius: 8px;
  padding: 16px 24px;
  background: #fff;
  width: 1280px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-notice-text {
  flex: 1;
  min-width: 0;
}

.cookie-notice-desc {
  margin: 0;
  font-size: 14px;
  color: #191B1F;
  line-height: 22px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cookie-info-icon {
  width: 20px;
  height: 20px;
  background-image: url("/public/images/cookie/info.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.cookie-desc-text {
  flex: 1;
}

.cookie-policy-link-text {
  color: #0066cc;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-policy-link-text:hover {
  text-decoration: underline;
}

.cookie-notice-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  font-weight: 500;
  border: none;
  background: #fff;
}

.cookie-btn-accept {
  background: linear-gradient(0deg, #191B1F, #191B1F), linear-gradient(97deg, #2DD4BF -62%, #002E93 41%, #F43F5E 143%);
  background-blend-mode: soft-light, normal; 
  color: #fff;
  border: none;
  min-width: 140px;
}

.cookie-btn-accept:hover {
  background: linear-gradient(0deg, rgba(16, 28, 47, 0.4), rgba(16, 28, 47, 0.4)), linear-gradient(100deg, #2DD4BF -63%, #002E93 41%, #F43F5E 143%);
}
.cookie-btn-accept:active {
  background: linear-gradient(0deg, #000000, #000000), linear-gradient(100deg, #2DD4BF -63%, #002E93 41%, #F43F5E 143%);
}

.cookie-btn-essential {
  /* background: #f5f5f5; */
  /* background: #F6F7FA; */
  color: #191B1F;
  border: 1px solid #D5D9DE;
  min-width: 120px;
}

.cookie-btn-essential:hover {
  /* background: #e8e8e8; */
  border: 1px solid #000000;
}
.cookie-btn-essential:active{
  border: 1px solid #000000;
}


.cookie-btn-manage {
  /* background: #f5f5f5; */
  /* background: #F6F7FA; */
  color: #191B1F;
  border: 1px solid #D5D9DE;
  min-width: 120px;
}

.cookie-btn-manage:hover {
  border: 1px solid #000000;
}
.cookie-btn-manage:active{
  border: 1px solid #000000;
}
.cookie-btn-save {
  background: #0066cc;
  color: #fff;
  padding: 12px 30px;
  font-size: 16px;
}

.cookie-btn-save:hover {
  background: #0052a3;
}

/* Cookie设置弹窗 */
.cookie-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.cookie-settings-modal {
  background: #fff;
  border-radius: 8px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e0e0e0;
}

.cookie-settings-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-settings-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-size: cover;
  /* border-radius: 50%; */
  /* background: #0066cc; */
  background: url("/public/images/cookie/manage.png") no-repeat center center;
  background-size: cover;
  /* color: #fff; */
  font-size: 14px;
  font-weight: bold;
}

.cookie-settings-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #333;
}

.cookie-settings-close {
  background: none;
  border: none;
  font-size: 32px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  line-height: 1;
  transition: color 0.3s;
}

.cookie-settings-close:hover {
  color: #333;
}

.cookie-settings-body {
  padding: 24px;
}

.cookie-settings-desc {
  margin: 0 0 30px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.cookie-link {
  color: #0066cc;
  text-decoration: none;
}

.cookie-link:hover {
  text-decoration: underline;
}

.cookie-category {
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(238, 242, 250, 0.5);
  border: 1px solid #EBEEF2;
  border-radius: 8px;
}

.cookie-category:last-of-type {
  margin-bottom: 24px;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 15px;
}

.cookie-category-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #191B1F;
  flex: 1;
}

.cookie-category-desc {
  margin: 0;
  font-size: 14px;
  color: #191B1F;
  line-height: 22px;
}

/* Toggle开关样式 */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d0d0d0;
  transition: 0.3s;
  border-radius: 26px;
}

.cookie-toggle-slider:before {
  position: absolute;
  content: "";
  bottom: 2px;
  left: 3px;
  width: 18px;
  height: 18px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: linear-gradient(0deg, #101C2F, #101C2F), linear-gradient(129deg, #2DD4BF -80%, #002E93 40%, #F43F5E 157%);
  background-blend-mode: soft-light, normal;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
  transform: translateX(18px);
}

.cookie-toggle input:focus + .cookie-toggle-slider {
  box-shadow: 0 0 1px #0066cc;
}

.cookie-toggle-disabled {
  /* opacity: 0.6; */
  cursor: not-allowed;
}

.cookie-toggle-disabled .cookie-toggle-slider {
  cursor: not-allowed;
  background-color: #0066cc;
}

.cookie-settings-footer {
  display: flex;
  justify-content: center;
  padding: 0 0px 24px;
}

.cookie-btn-custom:hover {
  background: #f5f5f5;
}

.cookie-btn-accept-all {
  background: linear-gradient(0deg, #191B1F, #191B1F), linear-gradient(100deg, #2DD4BF -63%, #002E93 41%, #F43F5E 143%);
  background-blend-mode: soft-light, normal;
  color: #fff;
  border: none;
  font-size: 16px;
  border-radius: 8px;
  width: 100%;
}

.cookie-btn-accept-all:hover {
  background: linear-gradient(0deg, rgba(16, 28, 47, 0.4), rgba(16, 28, 47, 0.4)), linear-gradient(100deg, #2DD4BF -63%, #002E93 41%, #F43F5E 143%);
  /* transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); */
}

/* 响应式设计 */
@media (max-width: 768px) {
  .cookie-notice-banner {
    padding: 15px;
  }

  .cookie-notice-content {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 16px;
    width: 100%;
  }

  .cookie-notice-buttons {
    width: 100%;
    flex-wrap: wrap;
  }

  .cookie-btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cookie-settings-modal {
    margin: 10px;
    max-height: calc(100vh - 30px);
  }

  .cookie-settings-header,
  .cookie-settings-body,
  .cookie-settings-footer {
    padding: 20px;
    flex-direction: column;
  }

  .cookie-btn-accept-all {
    width: 100%;
  }

  .cookie-category-header {
    flex-wrap: wrap;
  }
}
