/* 微信联系续费弹窗（日间默认，夜间 body.dark-mode 覆盖） */
.xcl-renew-modal[hidden] {
  display: none !important;
}

.xcl-renew-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.xcl-renew-modal.is-visible {
  display: flex !important;
}

.xcl-rm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.xcl-renew-modal-content {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border-radius: 20px;
  padding: 1.35rem 1.35rem 1.2rem;
  background: linear-gradient(165deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  box-shadow:
    0 24px 64px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(239, 68, 68, 0.08);
  color: #1e293b;
  transform: translateY(8px) scale(0.98);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.xcl-renew-modal.is-visible .xcl-renew-modal-content {
  transform: none;
  opacity: 1;
}

.xcl-renew-modal .close-modal-button,
.xcl-rm-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.xcl-renew-modal .close-modal-button:hover,
.xcl-rm-close:hover {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.xcl-rm-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.1rem;
  align-items: center;
}

.xcl-rm-copy h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.3;
  color: #0f172a;
  font-weight: 700;
}

.xcl-rm-desc {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #64748b;
}

.xcl-rm-steps {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.86rem;
  line-height: 1.7;
  color: #475569;
}

.xcl-rm-steps li + li {
  margin-top: 0.15rem;
}

.xcl-rm-userhint {
  margin: 0.9rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.22);
  font-size: 0.84rem;
  color: #b91c1c;
}

.xcl-rm-userhint strong {
  color: #0f172a;
  font-weight: 700;
}

.xcl-rm-coupon {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0 0 0.85rem;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px dashed rgba(239, 68, 68, 0.4);
}

.xcl-rm-coupon-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: #ef4444;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.xcl-rm-coupon-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #dc2626;
}

.xcl-rm-coupon-timer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.xcl-rm-coupon-note {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.xcl-rm-coupon-digits {
  display: inline-flex;
  align-items: baseline;
  gap: 0.08rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #0f172a;
}

.xcl-rm-coupon-digits span[data-cd] {
  display: inline-block;
  min-width: 1.35em;
  padding: 0.08rem 0.22rem;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.06);
  text-align: center;
  font-size: 0.8rem;
}

.xcl-rm-coupon-digits small {
  margin: 0 0.06rem 0 0.02rem;
  font-size: 0.64rem;
  font-weight: 500;
  color: #94a3b8;
}

.xcl-rm-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  justify-self: center;
}

.xcl-rm-qr .xcl-qr-scan {
  border-radius: 14px;
  display: inline-block;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.xcl-rm-qr img {
  width: 168px;
  height: 168px;
  object-fit: contain;
  border-radius: 14px;
  padding: 8px;
  background: #fff;
  box-shadow: none;
}

.xcl-rm-qr span {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}

.xcl-rm-qr-empty {
  min-height: 168px;
  min-width: 168px;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

/* —— 夜间 —— */
body.dark-mode .xcl-rm-backdrop {
  background: rgba(6, 10, 18, 0.72);
}

body.dark-mode .xcl-renew-modal-content {
  background: linear-gradient(165deg, rgba(30, 36, 48, 0.98), rgba(17, 22, 32, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(232, 93, 76, 0.12);
  color: #e8eaed;
}

body.dark-mode .xcl-renew-modal .close-modal-button,
body.dark-mode .xcl-rm-close {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body.dark-mode .xcl-renew-modal .close-modal-button:hover,
body.dark-mode .xcl-rm-close:hover {
  background: rgba(232, 93, 76, 0.85);
  color: #fff;
}

body.dark-mode .xcl-renew-modal .xcl-rm-copy h3 {
  color: #fff !important;
}

body.dark-mode .xcl-renew-modal .xcl-rm-desc {
  color: rgba(232, 234, 237, 0.78) !important;
}

body.dark-mode .xcl-renew-modal .xcl-rm-steps {
  color: rgba(232, 234, 237, 0.88) !important;
}

body.dark-mode .xcl-rm-userhint {
  background: rgba(232, 93, 76, 0.12);
  border-color: rgba(232, 93, 76, 0.28);
  color: #ffd2cb;
}

body.dark-mode .xcl-rm-userhint strong {
  color: #fff;
}

body.dark-mode .xcl-rm-coupon {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(232, 93, 76, 0.45);
}

body.dark-mode .xcl-rm-coupon-tag {
  background: #e85d4c;
}

body.dark-mode .xcl-rm-coupon-price {
  color: #ffb4aa;
}

body.dark-mode .xcl-rm-coupon-note {
  color: rgba(232, 234, 237, 0.65);
}

body.dark-mode .xcl-rm-coupon-digits {
  color: #f8fafc;
}

body.dark-mode .xcl-rm-coupon-digits span[data-cd] {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .xcl-rm-qr .xcl-qr-scan {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

body.dark-mode .xcl-rm-qr span {
  color: rgba(232, 234, 237, 0.7);
}

body.dark-mode .xcl-rm-qr-empty {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(232, 234, 237, 0.6);
}

@media (max-width: 640px) {
  .xcl-rm-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .xcl-rm-steps {
    display: inline-block;
    text-align: left;
  }

  .xcl-rm-qr {
    order: -1;
  }

  .xcl-rm-qr img {
    width: 148px;
    height: 148px;
  }
}

/* 单点登录：被其它设备顶下线提示 */
.xcl-auth-toast {
  position: fixed;
  left: 50%;
  bottom: 18%;
  transform: translate(-50%, 12px);
  z-index: 100060;
  max-width: min(92vw, 420px);
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.xcl-auth-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.dark-mode .xcl-auth-toast {
  background: rgba(0, 0, 0, 0.88);
}

/* 踢下线：固定两行，每行尽量不折 */
.xcl-kick-line {
  display: block;
  white-space: nowrap;
  line-height: 1.4;
}

.vip-login-modal-content .pmpro_message.pmpro_alert.is-kicked {
  text-align: left !important;
  line-height: 1.4 !important;
}

.vip-login-modal-content .pmpro_message.pmpro_alert.is-kicked .xcl-kick-line + .xcl-kick-line {
  margin-top: 0.2em;
}

/* 被踢提示：屏幕垂直居中、主题红；PC 单行，移动端两行短句 */
.xcl-auth-toast.is-kicked,
body.dark-mode .xcl-auth-toast.is-kicked {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, calc(-50% + 12px));
  border-radius: 12px;
  padding: 0.8rem 1.4rem;
  max-width: 94vw;
  white-space: nowrap;
  background: #ef4444;
  box-shadow: 0 16px 48px rgba(239, 68, 68, 0.35);
}

.xcl-auth-toast.is-kicked.is-on {
  transform: translate(-50%, -50%);
}

.xcl-auth-toast.is-kicked .xcl-kick-line {
  display: inline;
}

.xcl-auth-toast.is-kicked .xcl-kick-line + .xcl-kick-line {
  font-weight: 500;
  opacity: 0.92;
}

@media (max-width: 768px) {
  .vip-login-modal-content .pmpro_message.pmpro_alert.is-kicked {
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 10px 12px !important;
    letter-spacing: 0 !important;
  }

  .vip-login-modal-content .pmpro_message.pmpro_alert.is-kicked .xcl-kick-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .xcl-auth-toast.is-kicked {
    font-size: 13px;
    font-weight: 600;
    padding: 0.7rem 1rem;
  }

  .xcl-auth-toast.is-kicked .xcl-kick-line {
    display: block;
  }

  .xcl-auth-toast.is-kicked .xcl-kick-line + .xcl-kick-line {
    margin-top: 0.2em;
  }
}
