/* ==================== COOKIE CONSENT ==================== */

.cookie-consent {
  position: fixed;
  left: calc(30 * var(--u));
  bottom: calc(30 * var(--u));
  z-index: 1000;
  width: calc(320 * var(--u));
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: calc(4 * var(--u)) calc(4 * var(--u)) calc(10 * var(--u)) 0 rgba(0, 0, 0, 0.25);
  overflow: hidden;
  opacity: 0;
  transform: translateY(calc(20 * var(--u)));
  transition: opacity var(--duration-base) var(--ease-standard),
              transform var(--duration-base) var(--ease-standard);
  pointer-events: none;
}

.cookie-consent.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-consent__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(16 * var(--u)) calc(24 * var(--u)) 0;
}

.cookie-consent__text {
  display: flex;
  flex-direction: column;
  gap: calc(17 * var(--u));
  width: 100%;
}

.cookie-consent__title {
  font-family: var(--font-primary);
  font-size: calc(16 * var(--u));
  font-weight: 600;
  line-height: 1.6;
  color: var(--color-black);
  margin: 0;
}

.cookie-consent__desc {
  font-family: var(--font-primary);
  font-size: clamp(calc(13 * var(--u)), 0.04vw + calc(12.8 * var(--u)), calc(14 * var(--u)));
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-black);
  margin: 0;
  word-break: break-word;
}

.cookie-consent__link,
.cookie-consent__link:hover,
.cookie-consent__link:focus,
.cookie-consent__link:active {
  font-weight: 600;
  text-decoration: none !important;
  color: var(--color-black);
}

.cookie-consent__link:hover {
  color: var(--color-primary);
}

/* ---- Actions: buttons + 分割线 ---- */
.cookie-consent__actions {
  position: relative;
  display: flex;
  gap: 0;
  margin: calc(24 * var(--u)) calc(-26 * var(--u)) 0 calc(-26 * var(--u));
  width: calc(100% + calc(52 * var(--u)));
}

/* 水平线 — 按钮上方分隔线 */
.cookie-consent__actions::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(1 * var(--u));
  background: var(--color-placeholder);
  pointer-events: none;
}

/* 垂直线 — 两按钮之间分隔线，紧贴上边线 */
.cookie-consent__actions::after {
  content: '';
  position: absolute;
  top: 0;
  left: 31.76%;
  width: calc(1 * var(--u));
  height: calc(50 * var(--u));
  background: var(--color-placeholder);
  pointer-events: none;
}

.cookie-consent__btn {
  height: calc(50 * var(--u));
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(8 * var(--u));
  border: none;
  background: var(--color-white);
  font-family: var(--font-primary);
  font-size: clamp(calc(13 * var(--u)), 0.04vw + calc(12.8 * var(--u)), calc(14 * var(--u)));
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-black);
  cursor: pointer;
  transition: background var(--duration-micro) var(--ease-standard),
              color var(--duration-micro) var(--ease-standard);
}

.cookie-consent__btn--agree {
  flex-basis: 31.76%;
  border-bottom-left-radius: calc(16 * var(--u));
}

.cookie-consent__btn--disagree {
  flex-basis: 68.24%;
  border-bottom-right-radius: calc(16 * var(--u));
}

.cookie-consent__btn:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* 响应式：小屏幕 */
@media (max-width: 480px) {
  .cookie-consent {
    left: 16px;
    right: 16px;
    bottom: 16px;
    width: auto;
  }

  .cookie-consent__inner {
    padding: 16px 20px 0;
  }

  .cookie-consent__actions {
    margin: 24px -21px 0 -21px;
    width: calc(100% + 42px);
    flex-direction: column;
  }

  .cookie-consent__btn--agree {
    flex-basis: auto;
    border-bottom-left-radius: 0;
  }

  .cookie-consent__btn--disagree {
    flex-basis: auto;
    border-bottom-right-radius: 16px;
  }

  /* 移动端：竖线改为横线 */
  .cookie-consent__actions::after {
    top: 50px;
    left: 0;
    width: 100%;
    height: 1px;
  }
}
