/**
 * tb-link.css — 淘金币互助页面样式
 * Red-and-gold Tmall-style color scheme
 * Full styling in task 5.3
 */

/* === Color Variables === */
.tb-page,
[data-page-mode="tb"] {
  --tb-primary: #e4393c;
  --tb-primary-dark: #c5282b;
  --tb-primary-light: #fff1f0;
  --tb-accent: #ffd700;
  --tb-accent-light: #fff8e1;
  --tb-bg: #fef7f0;
  --tb-card-border: rgba(228, 57, 60, 0.1);
}

/* === Page Background === */
[data-page-mode="tb"] .koul-page-body {
  background: var(--tb-bg);
}

/* === Top Card === */
.tb-top-card {
  border-left: 3px solid var(--tb-primary);
}

/* === Stats Bar === */
.tb-stats-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--tb-accent-light);
  border-radius: 6px;
  font-size: 12px;
  color: #92400e;
}
.tb-stat-item strong {
  color: var(--tb-primary);
  font-weight: 600;
}
.tb-stat-sep {
  color: #d4a017;
  margin: 0 2px;
}

/* === Tab Navigation === */
.tb-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.tb-tab {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.tb-tab--active {
  color: var(--tb-primary);
  background: var(--tb-primary-light);
  font-weight: 600;
}
.tb-tab--smart {
  flex: none;
  padding: 9px 18px;
  margin-left: 4px;
  background: linear-gradient(135deg, var(--tb-primary), #ff6034);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(228, 57, 60, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.tb-tab--smart:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(228, 57, 60, 0.2);
}

/* === Publish Card === */
.tb-publish-card {
  border-top: 2px solid var(--tb-primary);
}
.tb-publish-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}
.tb-raw-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  resize: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}
.tb-raw-input:focus {
  outline: none;
  border-color: var(--tb-primary);
  box-shadow: 0 0 0 3px rgba(228, 57, 60, 0.08);
}
.tb-publish-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.tb-size-select {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tb-size-label {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}
.tb-size-input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}
.tb-publish-btn {
  background: var(--tb-primary) !important;
}
.tb-publish-btn:active {
  background: var(--tb-primary-dark) !important;
}

/* === Panel visibility === */
.tb-panel[hidden] {
  display: none;
}

/* === Stale indicator === */
.tb-stale-indicator {
  font-size: 11px;
  color: #f59e0b;
  margin-left: 8px;
  padding: 2px 6px;
  background: #fffbeb;
  border-radius: 4px;
}

/* === Team List Items (placeholder for task 5.3) === */
.tb-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* === Modal styles === */
.tb-modal .tb-modal-body {
  padding: 8px 0;
}
.tb-modal-desc {
  font-size: 13px;
  color: #475569;
  margin: 0 0 10px;
}
.tb-modal-code {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
  word-break: break-all;
  user-select: all;
  margin: 8px 0;
}
.tb-modal-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: 8px 0 0;
}
.tb-modal-empty {
  text-align: center;
  padding: 16px 0;
}
.tb-copy-btn {
  width: 100%;
  padding: 10px;
  background: var(--tb-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.tb-copy-btn:active {
  background: var(--tb-primary-dark);
}

/* === Responsive === */
@media (max-width: 380px) {
  .tb-tabs {
    padding: 3px;
  }
  .tb-tab {
    padding: 8px 6px;
    font-size: 13px;
  }
  .tb-tab--smart {
    padding: 7px 12px;
    font-size: 12px;
  }
  .tb-stats-bar {
    flex-wrap: wrap;
    gap: 2px 8px;
  }
}

@media (max-width: 320px) {
  .tb-publish-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tb-size-select {
    justify-content: space-between;
  }
}
