/* 客服发送软件安装包（APK）· 卡片与发送面板样式
   2026-10-26 老板需求：客服可以给用户发软件 APK。 */

.apk-card-host {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.apk-card {
  width: min(340px, 78vw);
  box-sizing: border-box;
  padding: 14px 14px 12px;
  border: 1px solid #f0d8bd;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf3 0%, #ffffff 58%);
  box-shadow: 0 2px 10px rgba(180, 118, 40, 0.08);
  font-size: 13px;
  line-height: 1.5;
  color: #2c2118;
  text-align: left;
}

.apk-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.apk-card-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ff9f43 0%, #ff7a1a 100%);
  box-shadow: 0 3px 8px rgba(255, 122, 26, 0.28);
}

.apk-card-icon svg {
  width: 21px;
  height: 21px;
}

.apk-card-titles {
  min-width: 0;
  flex: 1 1 auto;
}

.apk-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #241a12;
  word-break: break-all;
}

.apk-card-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.apk-card-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff1e2;
  border: 1px solid #ffdfc0;
  font-size: 11px;
  color: #a8631c;
  white-space: nowrap;
}

.apk-card-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fdf6ee;
  color: #6b5442;
  font-size: 12px;
  word-break: break-word;
}

.apk-card-actions {
  margin-top: 11px;
  display: flex;
  gap: 8px;
}

.apk-card-download {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff9f43 0%, #ff7a1a 100%);
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 3px 9px rgba(255, 122, 26, 0.26);
}

.apk-card-download:active {
  transform: translateY(1px);
}

.apk-card-copy {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1px solid #ffd7b0;
  background: #fff;
  color: #b56a1c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.apk-card-hint {
  margin-top: 9px;
  font-size: 11px;
  color: #a08b78;
  text-align: center;
}

/* ---------- 客服端工具栏按钮 ---------- */

.apk-send-button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 11px;
  margin-right: 6px;
  border-radius: 9px;
  border: 1px solid #ffd7b0;
  background: #fff6ec;
  color: #b56a1c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.apk-send-button:active {
  background: #ffe9d4;
}

/* ---------- 发送面板 ---------- */

.apk-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(24, 16, 10, 0.46);
  backdrop-filter: blur(2px);
}

.apk-dialog {
  width: min(420px, 100%);
  max-height: 86vh;
  overflow: auto;
  box-sizing: border-box;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  color: #2c2118;
  font-size: 13px;
}

.apk-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.apk-dialog-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.apk-dialog-close {
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid #eee2d6;
  background: #faf7f3;
  color: #6b5442;
  font-size: 12px;
  cursor: pointer;
}

.apk-pick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.apk-pick {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid #ffd7b0;
  background: #fff6ec;
  color: #b56a1c;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.apk-pick:disabled {
  opacity: 0.6;
  cursor: default;
}

.apk-pick-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #8a7563;
}

.apk-fields {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.apk-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apk-field-label {
  font-size: 12px;
  color: #8a7563;
}

.apk-field-input {
  height: 38px;
  padding: 0 11px;
  border-radius: 11px;
  border: 1px solid #eadfd3;
  background: #fdfcfb;
  color: #2c2118;
  font-size: 13px;
  outline: none;
}

.apk-field-input:focus {
  border-color: #ffb877;
  background: #fff;
}

.apk-progress {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: #f4ece4;
  overflow: hidden;
}

.apk-progress-bar {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb055, #ff7a1a);
  transition: width 0.18s ease;
}

.apk-dialog-actions {
  margin-top: 14px;
}

.apk-submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff9f43 0%, #ff7a1a 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 122, 26, 0.26);
}

.apk-submit:disabled {
  background: #e7ddd4;
  color: #a3948a;
  box-shadow: none;
  cursor: default;
}

.apk-recent {
  margin-top: 16px;
  border-top: 1px dashed #eee2d6;
  padding-top: 12px;
}

.apk-recent-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #8a7563;
}

.apk-recent-empty {
  margin: 0;
  font-size: 12px;
  color: #a08b78;
}

.apk-recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.apk-recent-row + .apk-recent-row {
  border-top: 1px solid #f6efe8;
}

.apk-recent-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.apk-recent-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apk-recent-meta {
  font-size: 11px;
  color: #a08b78;
}

.apk-recent-send {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid #ffd7b0;
  background: #fff6ec;
  color: #b56a1c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.apk-recent-send:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---------- 提示条 ---------- */

.apk-toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 100000;
  transform: translateX(-50%);
  max-width: 82vw;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(38, 26, 16, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

@media (max-width: 420px) {
  .apk-card {
    width: min(300px, 74vw);
  }
}
