/* ==========================================================================
   common/auth-tip.css  —  「登录后才能操作」蓝色提示弹窗
   --------------------------------------------------------------------------
   配套 common/auth-tip.js（window.dlAuthTip）。目前用在 /download.html：
   未登录点「下载」时弹这个窗，点「去登录」才跳登录页，登录后自动回到本页。

   为什么不用 v10 的 showMessage（.alert 那种）：它是一小条 toast，用来
   解释「为什么不能下载」太重、也不够显眼；这里做成居中弹窗 + 遮罩。

   配色沿用站点主色 --Original(#0056fe) 那一套蓝，与「去登录」按钮同色。
   所有类名带 dl-auth- 前缀，避免和主题里已有的 .alert / .modal 冲突。
   ========================================================================== */

/* ---------- 遮罩 ---------- */
.dl-auth-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.dl-auth-mask.is-show {
  opacity: 1;
}

/* ---------- 弹窗 ---------- */
.dl-auth-box {
  box-sizing: border-box;
  width: 420px;
  max-width: 100%;
  padding: 22px 24px 18px;
  border-radius: 8px;
  border-top: 3px solid #0056fe;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  text-align: left;
  transform: translateY(-12px) scale(0.98);
  transition: transform 0.22s ease;
}

.dl-auth-mask.is-show .dl-auth-box {
  transform: translateY(0) scale(1);
}

/* ---------- 标题行：蓝色圆形叹号 + 标题 ---------- */
.dl-auth-box-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dl-auth-box-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8f0ff;
  background-image: linear-gradient(#0056fe, #0056fe),
    radial-gradient(circle at 50% 74%, #0056fe 0 2px, transparent 2px);
  background-repeat: no-repeat;
  background-size: 2px 9px, 4px 4px;
  background-position: 50% 5px, 50% 74%;
  font-size: 0;
  color: transparent;
  line-height: 0;
}

.dl-auth-box-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: #1a1a1a;
}

/* ---------- 正文 ---------- */
.dl-auth-box-body {
  color: #666;
  font-size: 14px;
  line-height: 22px;
  padding-left: 32px;
  margin-bottom: 22px;
  word-break: break-word;
}

/* ---------- 按钮行 ---------- */
.dl-auth-box-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dl-auth-btn {
  box-sizing: border-box;
  min-width: 84px;
  height: 34px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

/* 取消：白底灰边 */
.dl-auth-btn-plain {
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #666;
}

.dl-auth-btn-plain:hover {
  border-color: #0056fe;
  color: #0056fe;
}

/* 去登录：主色实心 */
.dl-auth-btn-main {
  border: 1px solid #0056fe;
  background: #0056fe;
  color: #fff;
}

.dl-auth-btn-main:hover {
  border-color: #0046cc;
  background: #0046cc;
  color: #fff;
}

/* 防止主题里 button 的默认样式（比如 62px 满高导航按钮）串进来 */
.dl-auth-box button {
  margin: 0;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* ---------- 手机 ---------- */
@media (max-width: 768px) {
  .dl-auth-box {
    width: 100%;
    padding: 18px 18px 16px;
  }

  .dl-auth-box-body {
    padding-left: 0;
    margin-bottom: 18px;
  }

  .dl-auth-btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* ---------- 降级用的小 toast ----------
   js/download.js 里的普通提示（非登录相关）在主题 showMessage 不可用时用这个，
   例如「下载地址获取失败」；不影响上面的弹窗。 */
.dl-auth-toast {
  position: fixed;
  left: 50%;
  top: 24px;
  z-index: 99999;
  transform: translate(-50%, -12px);
  max-width: 80vw;
  padding: 10px 18px;
  border-radius: 4px;
  border-left: 3px solid #ff8a3d;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  font-size: 14px;
  line-height: 1.4;
  color: #333;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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