/*
实现原理：提供页面内本地缓存管理卡片、帖子摘要和局部操作按钮的移动端视觉样式。
如何使用：index.html 在通用样式后加载，本文件样式由 app_cache_manager.js 渲染节点使用。
*/

.cache-manager-page {
  width: min(100%, 760px);
  margin: 10px auto 14px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 14px 12px;
}

.cache-manager-panel {
  display: grid;
  gap: 12px;
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.24);
}

.cache-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cache-manager-head h3 {
  margin: 0 0 5px;
  color: #2d3040;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.2;
}

.cache-manager-head p,
.cache-manager-message {
  margin: 0;
  color: #69708a;
  font-size: 13px;
  line-height: 1.5;
}

.cache-manager-message {
  border: 1px solid #d7d5ff;
  border-radius: 12px;
  padding: 9px 12px;
  background: #f3f2ff;
  color: var(--accent);
  font-weight: 700;
}

.cache-post-summary {
  display: grid;
  gap: 10px;
  border: 1px solid #d7d5ff;
  border-radius: 18px;
  padding: 13px;
  background:
    linear-gradient(180deg, rgba(71, 66, 233, 0.08), rgba(255, 255, 255, 0.95)),
    #fbfbff;
}

.cache-summary-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #30334a;
  font-weight: 850;
}

.cache-summary-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cache-summary-title .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.cache-summary-grid {
  display: grid;
  gap: 8px;
  margin: 0;
}

.cache-summary-grid div {
  min-width: 0;
  border: 1px solid #ececff;
  border-radius: 13px;
  padding: 8px 10px;
  background: #fff;
}

.cache-summary-grid dt {
  margin: 0 0 4px;
  color: #8a91aa;
  font-size: 11px;
  font-weight: 750;
}

.cache-summary-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #3c4058;
  font-family: Consolas, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.cache-manager-close {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #edeef7;
  background: #f8f8fc;
  color: #565b72;
  box-shadow: none;
}

.cache-pill {
  height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e4f2;
  border-radius: 999px;
  padding: 0 9px;
  background: #f8f8fc;
  color: #69708a;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.cache-pill.active {
  border-color: #cbc9ff;
  background: #f0efff;
  color: var(--accent);
}

.cache-info-list {
  display: grid;
  gap: 12px;
}

.cache-info-card {
  display: grid;
  gap: 12px;
  border: 1px solid #e4e5f4;
  border-radius: 18px;
  padding: 13px;
  background: #fff;
}

.cache-info-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.cache-info-title {
  min-width: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  color: #30334a;
  font-size: 15px;
  font-weight: 850;
}

.cache-info-title span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #efefff;
  color: var(--accent);
  flex-shrink: 0;
}

.cache-info-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cache-info-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.cache-info-grid {
  display: grid;
  gap: 8px;
  margin: 0;
}

.cache-info-grid div {
  min-width: 0;
  border: 1px solid #f0f1f8;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fbfbfe;
}

.cache-info-grid dt {
  margin: 0 0 4px;
  color: #8a91aa;
  font-size: 11px;
  font-weight: 750;
}

.cache-info-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #3c4058;
  font-family: Consolas, "Microsoft YaHei", sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

.cache-manager-empty {
  margin: 0;
  border: 1px dashed #d7d9e8;
  border-radius: 16px;
  padding: 24px 14px;
  color: #69708a;
  text-align: center;
}

.cache-manager-action {
  min-height: 42px;
  border: 1px solid #d7d5ff;
  border-radius: 14px;
  padding: 0 12px;
  background: linear-gradient(135deg, #f8f7ff, #ebeaff);
  color: var(--accent);
  box-shadow: 0 8px 18px rgba(71, 66, 233, 0.1);
  font-size: 13px;
}

.cache-manager-action.danger {
  border-color: rgba(217, 45, 32, 0.24);
  background: #fff4f2;
  color: var(--danger);
  box-shadow: none;
}

@media (max-width: 520px) {
  .cache-manager-page {
    padding: 0 8px;
  }

  .cache-manager-panel {
    border-radius: 18px;
    padding: 18px 14px 14px;
  }

  .cache-info-card header {
    grid-template-columns: 1fr;
  }

  .cache-info-pills {
    justify-content: flex-start;
  }

}
