/* ============================================================
   XJTLU Tools — 全局「我的记录」抽屉组件样式 (records-drawer.css)
   ============================================================ */

/* ── 右上角 Avatar 触发按钮 ── */
.records-avatar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border, #E2E8F0);
  color: var(--ink-2, #475569);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.records-avatar-btn:hover {
  color: var(--primary-color, #003087);
  border-color: var(--primary-color, #003087);
  background: var(--xjtlu-blue-light, #EEF2F9);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 48, 135, 0.12);
}

.records-avatar-btn:active {
  transform: scale(0.95);
}

/* 活跃小绿点 Badge */
.records-badge-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  background-color: #10B981;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3);
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ── 抽屉遮罩层 ── */
.records-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
}

.records-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── 抽屉本体面板 ── */
.records-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: var(--bg-base, #F8FAFC);
  z-index: 9999;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.records-drawer-overlay.active .records-drawer {
  transform: translateX(0);
}

/* ── 抽屉头部 ── */
.records-drawer-head {
  padding: 18px 20px;
  background: var(--bg-card, #ffffff);
  border-bottom: 1px solid var(--border, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.records-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.records-drawer-title {
  font-family: var(--font-heading, inherit);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-1, #0F172A);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.records-drawer-tag {
  font-size: 11px;
  font-weight: 600;
  color: #0284C7;
  background: #E0F2FE;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.records-drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-3, #64748B);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s ease;
}

.records-drawer-close:hover {
  background: var(--border, #E2E8F0);
  color: var(--ink-1, #0F172A);
}

/* ── 抽屉导航 Tab ── */
.records-drawer-tabs {
  display: flex;
  background: var(--bg-card, #ffffff);
  padding: 0 16px 8px;
  border-bottom: 1px solid var(--border, #E2E8F0);
  gap: 8px;
}

.records-tab-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--bg-base, #F1F5F9);
  color: var(--ink-2, #475569);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.records-tab-btn.active {
  background: var(--xjtlu-blue-light, #EEF2F9);
  color: var(--primary-color, #003087);
  border-color: rgba(0, 48, 135, 0.18);
}

.records-tab-btn:hover:not(.active) {
  background: #E2E8F0;
  color: var(--ink-1, #0F172A);
}

/* ── 抽屉内容主体 ── */
.records-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 记录信息卡片 */
.records-card {
  background: var(--bg-card, #ffffff);
  border-radius: 12px;
  border: 1px solid var(--border, #E2E8F0);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

.records-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-1, #0F172A);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.records-time-tag {
  font-size: 11px;
  color: var(--ink-3, #64748B);
  font-family: var(--font-number, monospace);
}

.records-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.records-meta-item {
  display: flex;
  align-items: flex-start;
  font-size: 13px;
  color: var(--ink-2, #334155);
  line-height: 1.45;
}

.records-meta-label {
  color: var(--ink-3, #64748B);
  min-width: 68px;
  flex-shrink: 0;
}

.records-meta-val {
  font-weight: 500;
  word-break: break-all;
}

.records-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border, #E2E8F0);
}

.records-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.records-btn-primary {
  background: var(--primary-color, #003087);
  color: #ffffff;
}

.records-btn-primary:hover {
  background: #002261;
}

.records-btn-outline {
  background: transparent;
  border-color: var(--border, #CBD5E1);
  color: var(--ink-2, #334155);
}

.records-btn-outline:hover {
  background: var(--bg-base, #F1F5F9);
  border-color: var(--ink-3, #94A3B8);
  color: var(--ink-1, #0F172A);
}

.records-btn-danger {
  background: transparent;
  color: #DC2626;
  border-color: #FECACA;
  margin-left: auto;
}

.records-btn-danger:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
}

/* 空状态 */
.records-empty {
  text-align: center;
  padding: 32px 16px;
  background: var(--bg-card, #ffffff);
  border-radius: 12px;
  border: 1px dashed var(--border, #CBD5E1);
}

.records-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
}

.records-empty-text {
  font-size: 14px;
  color: var(--ink-3, #64748B);
  margin-bottom: 14px;
}

/* 缓存警示与声明卡片 */
.records-disclaimer {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 10px;
  padding: 12px 14px;
}

.records-disclaimer-title {
  font-size: 12px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.records-disclaimer-list {
  margin: 0;
  padding-left: 18px;
  font-size: 11.5px;
  color: #78350F;
  line-height: 1.55;
}

.records-disclaimer-list li {
  margin-bottom: 4px;
}

.records-disclaimer-list li:last-child {
  margin-bottom: 0;
}

.records-disclaimer-list strong,
.records-disclaimer-list b {
  font-weight: 600;
  color: #451A03;
}

/* 移动端适配 */
@media (max-width: 600px) {
  .records-drawer {
    max-width: 100%;
  }
}
