/**
 * 用友生态资源中心 - 构件表格、卡片、模态弹窗与页脚组件样式
 */

/* ================= 网盘列表视图 ================= */
.yy-drive-table-wrap {
  background: #ffffff;
  border: 1px solid var(--yy-slate-200);
  border-radius: var(--yy-radius-md);
  overflow-x: auto;
  box-shadow: var(--yy-shadow-sm);
  width: 100%;
}

.yy-drive-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  table-layout: auto;
}

.yy-drive-table th {
  background: var(--yy-slate-50);
  color: var(--yy-slate-600);
  font-weight: 600;
  padding: 14px 18px;
  border-bottom: 1px solid var(--yy-slate-200);
  white-space: nowrap;
}

.yy-drive-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--yy-slate-100);
  color: var(--yy-slate-700);
  vertical-align: middle;
}

.yy-drive-table tr:last-child td {
  border-bottom: none;
}

.yy-drive-table tr:hover td {
  background-color: #fafbfc;
}

.yy-file-title-cell {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.yy-file-icon {
  width: 36px;
  height: 36px;
  background: var(--yy-slate-100);
  border-radius: var(--yy-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yy-slate-600);
  flex-shrink: 0;
}

.yy-file-meta-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.yy-file-name-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--yy-slate-900);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.yy-badge-hot {
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--yy-radius-full);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.yy-file-subtext {
  font-size: 12px;
  color: var(--yy-slate-500);
  font-family: var(--yy-font-mono);
  word-break: break-all;
  line-height: 1.3;
}

.yy-badge-platform {
  display: inline-block;
  background: var(--yy-slate-100);
  color: var(--yy-slate-600);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--yy-radius-sm);
  font-family: var(--yy-font-mono);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================= 卡片网格视图 ================= */
.yy-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.yy-resource-card {
  background: #ffffff;
  border: 1px solid var(--yy-slate-200);
  border-radius: var(--yy-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--yy-shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.yy-resource-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--yy-shadow-md);
  border-color: var(--yy-slate-400);
}

.yy-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.yy-card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.yy-card-icon {
  width: 32px;
  height: 32px;
  background: var(--yy-slate-100);
  border-radius: var(--yy-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yy-slate-600);
  flex-shrink: 0;
}

.yy-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--yy-slate-900);
  line-height: 1.3;
}

.yy-card-filename {
  font-size: 11px;
  color: var(--yy-slate-500);
  font-family: var(--yy-font-mono);
  word-break: break-all;
  margin-top: 2px;
}

.yy-card-desc {
  font-size: 13px;
  color: var(--yy-slate-600);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.yy-card-meta-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  background: var(--yy-slate-50);
  padding: 10px;
  border-radius: var(--yy-radius-sm);
}

.yy-card-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.yy-card-meta-item span {
  font-size: 11px;
  color: var(--yy-slate-400);
}

.yy-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--yy-slate-100);
  gap: 10px;
  white-space: nowrap;
}

/* ================= 模态弹窗与多Tab ================= */
.yy-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.yy-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.yy-modal-content {
  background: #ffffff;
  width: 100%;
  max-width: 680px;
  border-radius: var(--yy-radius-lg);
  box-shadow: var(--yy-shadow-lg);
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.yy-modal-backdrop.active .yy-modal-content {
  transform: translateY(0);
}

.yy-modal-header {
  padding: 16px 24px;
  background: var(--yy-slate-50);
  border-bottom: 1px solid var(--yy-slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.yy-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--yy-slate-900);
  white-space: nowrap;
}

.yy-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--yy-slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
}

.yy-modal-close:hover {
  color: var(--yy-slate-800);
  background: var(--yy-slate-200);
}

.yy-modal-tabs {
  display: flex;
  background: var(--yy-slate-50);
  border-bottom: 1px solid var(--yy-slate-200);
  padding: 0 24px;
  white-space: nowrap;
  overflow-x: auto;
}

.yy-modal-tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--yy-slate-600);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.yy-modal-tab-btn:hover {
  color: var(--yy-slate-900);
}

.yy-modal-tab-btn.active {
  color: var(--yy-primary);
  border-bottom-color: var(--yy-primary);
  background: #ffffff;
}

.yy-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.yy-tab-pane {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.yy-tab-pane.active {
  display: flex;
}

.yy-detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 8px 0;
  border-bottom: 1px solid var(--yy-slate-100);
  gap: 16px;
  white-space: nowrap;
}

.yy-detail-label {
  color: var(--yy-slate-500);
  white-space: nowrap;
  flex-shrink: 0;
}

.yy-detail-val {
  color: var(--yy-slate-800);
  font-weight: 600;
  white-space: nowrap;
}

.yy-hash-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.yy-hash-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--yy-slate-600);
  white-space: nowrap;
}

.yy-hash-box {
  background: var(--yy-slate-100);
  padding: 10px 12px;
  border-radius: var(--yy-radius-sm);
  border: 1px solid var(--yy-slate-200);
  font-family: var(--yy-font-mono);
  font-size: 12px;
  color: var(--yy-slate-700);
  display: flex;
  align-items: center;
  justify-content: space-between;
  word-break: break-all;
  gap: 8px;
}

.yy-code-snippet {
  background: var(--yy-slate-900);
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: var(--yy-radius-sm);
  font-family: var(--yy-font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.yy-code-snippet span {
  word-break: break-all;
  min-width: 0;
}

.yy-modal-footer {
  padding: 14px 24px;
  background: var(--yy-slate-50);
  border-top: 1px solid var(--yy-slate-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
}

/* ================= 文章 / 博客列表 (releases.html) ================= */
.yy-article-card {
  background: #ffffff;
  border: 1px solid var(--yy-slate-200);
  border-radius: var(--yy-radius-md);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--yy-shadow-sm);
  transition: all 0.15s ease;
}

.yy-article-card:hover {
  border-color: var(--yy-slate-400);
  box-shadow: var(--yy-shadow-md);
}

.yy-article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--yy-slate-500);
  margin-bottom: 10px;
  flex-wrap: wrap;
  white-space: nowrap;
}

.yy-article-meta span {
  white-space: nowrap;
}

.yy-article-tag {
  background: var(--yy-blue-bg);
  color: var(--yy-blue);
  border: 1px solid var(--yy-blue-border);
  padding: 2px 8px;
  border-radius: var(--yy-radius-sm);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.yy-article-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--yy-slate-900);
  margin-bottom: 10px;
  line-height: 1.4;
}

.yy-article-summary {
  font-size: 14px;
  color: var(--yy-slate-600);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ================= 页脚 ================= */
.yy-footer {
  background: #ffffff;
  border-top: 1px solid var(--yy-slate-200);
  padding: 36px 24px 28px;
  margin-top: auto;
  font-size: 13px;
  color: var(--yy-slate-500);
  width: 100%;
  box-sizing: border-box;
}

.yy-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.yy-footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 28px;
}

.yy-footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--yy-slate-800);
  margin-bottom: 12px;
  white-space: nowrap;
}

.yy-footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yy-footer-links a {
  white-space: nowrap;
}

.yy-footer-links a:hover {
  color: var(--yy-primary);
}

.yy-footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--yy-slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  white-space: nowrap;
}

/* ================= 响应式调整 ================= */
@media (max-width: 900px) {
  .yy-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .yy-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .yy-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .yy-header-inner {
    padding: 12px 16px;
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .yy-top-banner {
    padding: 8px 16px;
  }
  .yy-top-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .yy-hero {
    padding: 24px 16px;
  }
  .yy-stats-grid {
    grid-template-columns: 1fr;
  }
  .yy-container {
    padding: 0 16px;
  }
  .yy-footer {
    padding: 28px 16px 20px;
  }
  .yy-footer-grid {
    grid-template-columns: 1fr;
  }
  .yy-search-kbd {
    display: none;
  }
  .yy-footer-bottom {
    white-space: normal;
  }
}
