/* Offer 任务模块（独立功能） */

/* 列表页：平台下拉筛选 */
.offer-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.offer-toolbar label { font-size: 13px; color: #555; }
.offer-toolbar select {
  padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px;
  background: #fff; color: #333; min-width: 200px;
}
.offer-toolbar select:focus { outline: none; border-color: #4361ee; }

.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.offer-card {
  background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
  cursor: pointer; border: 1px solid transparent; transition: border-color .15s, box-shadow .15s;
}
.offer-card:hover { border-color: #c7d2fe; box-shadow: 0 4px 12px rgba(67,97,238,0.12); }
.offer-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.offer-card-brand { font-size: 16px; font-weight: 600; color: #111; word-break: break-word; }
.offer-card-name { font-size: 13px; color: #888; margin-top: 2px; word-break: break-word; }
.offer-card-head .badge { white-space: nowrap; }

.offer-card-fields { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 12px; }
.offer-card-fields dt { color: #888; }
.offer-card-fields dd { color: #333; font-family: monospace; word-break: break-all; }

.offer-card-link { display: flex; gap: 6px; align-items: center; min-width: 0; }
.offer-card-link .code-box {
  flex: 1; min-width: 0; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.offer-card-geos { display: flex; flex-wrap: wrap; gap: 4px; }

.offer-empty { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }

/* 详情页 */
.offer-detail-top { margin-bottom: 16px; }
.offer-detail-brand { font-size: 20px; font-weight: 600; color: #111; word-break: break-word; }

.offer-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e2e8f0; margin-bottom: 16px; }
.offer-tab {
  padding: 10px 16px; border: none; background: none; font-size: 14px; color: #666; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.offer-tab:hover { color: #4361ee; }
.offer-tab.active { color: #4361ee; border-bottom-color: #4361ee; font-weight: 500; }

.offer-info-fields { display: grid; grid-template-columns: 100px 1fr; gap: 14px 16px; font-size: 13px; }
.offer-info-fields dt { color: #888; }
.offer-info-fields dd { color: #333; word-break: break-word; min-width: 0; }
.offer-info-fields dd.mono { font-family: monospace; }
.offer-custom-id { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.offer-custom-id .mono { font-family: monospace; font-size: 14px; font-weight: 600; word-break: break-all; }
.offer-custom-id-note { margin-top: 4px; }
.offer-info-link { display: flex; gap: 6px; align-items: flex-start; }
.offer-info-link .code-box { flex: 1; min-width: 0; padding: 8px 10px; }

/* 创建 Offer 弹窗 */
.offer-modal-box { width: 640px; max-width: calc(100vw - 32px); }
.offer-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.offer-required { color: #e53e3e; }
.offer-hint { font-size: 12px; color: #888; }
.form-group input.offer-invalid { border-color: #e53e3e; }
#offerFormCustomIdHint { margin-top: 4px; min-height: 16px; }
#offerFormCustomIdHint.offer-id-taken { color: #e53e3e; }
#offerFormCustomIdHint.offer-id-ok { color: #38a169; }
.offer-geo-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.offer-geo-tags { margin-top: 10px; }
.offer-geo-tag { display: inline-flex; align-items: center; gap: 4px; }
.offer-geo-tag button {
  border: none; background: none; color: inherit; cursor: pointer; font-weight: bold; font-size: 12px; line-height: 1; padding: 0;
}
.offer-form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
@media (max-width: 600px) { .offer-form-row { grid-template-columns: 1fr; } }

/* 卡片删除按钮 */
.offer-card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: auto; }
.offer-btn-sm { padding: 4px 12px; font-size: 12px; }
.offer-btn-sm:disabled { opacity: 0.6; cursor: not-allowed; }

/* 页面内容标签页（浏览器插件上传的落地页内容） */
.offer-snap-empty { padding: 32px 16px; text-align: center; color: #666; font-size: 13px; }
.offer-snap-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.offer-snap-head .offer-info-fields { flex: 1; min-width: 0; }
.offer-snap-url { word-break: break-all; }
.offer-snap-url a, .offer-snap-table a { color: #4361ee; text-decoration: none; }
.offer-snap-url a:hover, .offer-snap-table a:hover { text-decoration: underline; }
.offer-snap-section { border-top: 1px solid #eef0f4; padding: 12px 0 4px; }
.offer-snap-section summary { cursor: pointer; font-size: 14px; font-weight: 500; color: #333; list-style-position: inside; }
.offer-snap-count { margin-left: 8px; font-size: 12px; font-weight: 400; color: #888; }
.offer-snap-section-body { margin-top: 10px; font-size: 13px; }
.offer-snap-toolbar { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.offer-snap-text {
  margin: 0; max-height: 480px; overflow: auto; padding: 12px; background: #f8f9fb; border: 1px solid #e2e8f0;
  border-radius: 6px; font-family: inherit; font-size: 13px; line-height: 1.6; color: #333; white-space: pre-wrap; word-break: break-word;
}
.offer-snap-heading { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; color: #333; word-break: break-word; }
.offer-snap-heading .badge { flex-shrink: 0; }
.offer-snap-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.offer-snap-img {
  display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid #e2e8f0; border-radius: 6px;
  text-decoration: none; color: #666; font-size: 11px; min-width: 0; background: #fff;
}
.offer-snap-img:hover { border-color: #c7d2fe; }
.offer-snap-img img { width: 100%; height: 110px; object-fit: contain; background: #f8f9fb; border-radius: 4px; }
.offer-snap-img span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer-snap-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.offer-snap-table th, .offer-snap-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #eef0f4; vertical-align: top; word-break: break-all; }
.offer-snap-table th { color: #888; font-weight: 500; }
.offer-snap-table th:first-child { width: 35%; }
.offer-snap-table td.mono { font-family: monospace; }
@media (max-width: 600px) { .offer-snap-head { flex-direction: column; } }

/* 页面内容标签页：插件说明和下载 */
.offer-snap-guide { background: #f5f8ff; border: 1px solid #dbe4ff; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.offer-snap-guide-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.offer-snap-guide-title { font-size: 14px; font-weight: 500; color: #222; margin-bottom: 2px; }
.offer-snap-guide-row .btn { flex-shrink: 0; }
.offer-snap-steps { margin-top: 8px; font-size: 13px; color: #444; }
.offer-snap-steps summary { cursor: pointer; color: #4361ee; font-size: 13px; }
.offer-snap-steps ol { margin: 8px 0 0 20px; line-height: 1.8; }
.offer-snap-steps .mono { font-family: monospace; background: #fff; padding: 1px 4px; border-radius: 3px; }
@media (max-width: 600px) { .offer-snap-guide-row { flex-direction: column; align-items: flex-start; } }
.offer-snap-warn { margin-top: 4px; font-size: 12px; color: #b7791f; }

/* AI 清洗内容标签页 */
.offer-clean-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.offer-clean-select { padding: 4px 8px; font-size: 13px; border: 1px solid #d9dde5; border-radius: 4px; background: #fff; }
.offer-clean-select:disabled { opacity: 0.6; cursor: not-allowed; }
.offer-clean-status { min-height: 20px; margin: 8px 0 12px; font-size: 13px; color: #4361ee; }
.offer-clean-status.ok { color: #2f855a; }
.offer-clean-status.error { color: #e53e3e; }
.offer-clean-status.warn { color: #b7791f; }
.offer-clean-head { margin-bottom: 8px; }
.offer-clean-none { font-size: 13px; color: #b7791f; }
.offer-clean-list { margin: 0 0 0 18px; line-height: 1.7; color: #333; white-space: pre-wrap; word-break: break-word; }
.offer-clean-products th:first-child { width: 25%; }
.offer-clean-products th:nth-child(2) { width: 15%; }
.offer-clean-cell { white-space: pre-wrap; word-break: break-word; }
.offer-clean-h { margin: 12px 0 4px; font-weight: 600; color: #222; white-space: pre-wrap; word-break: break-word; }
.offer-clean-h .badge { font-weight: 400; margin-right: 6px; }
.offer-clean-h1 { font-size: 17px; }
.offer-clean-h2 { font-size: 16px; }
.offer-clean-h3 { font-size: 15px; }
.offer-clean-h4, .offer-clean-h5, .offer-clean-h6 { font-size: 14px; }
.offer-clean-p { margin: 0 0 6px; line-height: 1.7; color: #333; white-space: pre-wrap; word-break: break-word; }
