/**
 * VesselNexus — P13 广告位招商页（/advertise/）
 *
 * 位置卡网格、竞价框、我的报价/广告表、编辑器（AI 样板 + 表单 + 图片）。
 * 复用 vnx-main.css 的 .vnx-card / .vnx-btn / .vnx-alert 语义。
 */

/* ── 位置卡网格 ──────────────────────────────────────────────── */
.vnx-advertise-positions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--vnx-space-4, 16px);
  margin: var(--vnx-space-4, 16px) 0;
}

.vnx-advertise-position h3 {
  margin-top: 0;
  color: var(--vnx-color-heading, #1A1A2E);
}

.vnx-advertise-position__prices {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: var(--vnx-space-3, 12px);
}

.vnx-advertise-position__prices td {
  padding: 6px 4px;
  border-bottom: 1px dashed var(--vnx-color-border, #E3E3EA);
}

.vnx-advertise-position__prices td:last-child {
  text-align: right;
}

.vnx-advertise-position__bid {
  color: #B8860B;
}

.vnx-advertise-position__actions {
  display: flex;
  gap: var(--vnx-space-2, 8px);
  margin-bottom: var(--vnx-space-3, 12px);
}

.vnx-advertise-position__bidbox {
  display: flex;
  align-items: center;
  gap: var(--vnx-space-2, 8px);
  flex-wrap: wrap;
}

.vnx-advertise-position__bidbox label {
  font-size: 12px;
  color: var(--vnx-color-muted, #6B6B7E);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 140px;
}

.vnx-advertise-position__bidbox input {
  padding: 8px 10px;
  border: 1px solid var(--vnx-color-border, #E3E3EA);
  border-radius: var(--vnx-radius-md, 8px);
}

.vnx-advertise-position__locked {
  font-size: 13px;
  color: var(--vnx-color-muted, #6B6B7E);
  margin: var(--vnx-space-3, 12px) 0 0;
}

/* ── 我的报价 / 我的广告 表 ──────────────────────────────────── */
.vnx-advertise-mine {
  margin: var(--vnx-space-6, 24px) 0;
}

.vnx-advertise-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.vnx-advertise-table th,
.vnx-advertise-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--vnx-color-border, #E3E3EA);
  text-align: left;
  vertical-align: top;
}

.vnx-advertise-table th {
  color: var(--vnx-color-muted, #6B6B7E);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.vnx-advertise-table__actions {
  white-space: nowrap;
}

.vnx-advertise-table__actions .vnx-btn {
  margin-right: 6px;
}

/* ── 编辑器 ──────────────────────────────────────────────────── */
.vnx-advertise-editor {
  margin: var(--vnx-space-4, 16px) 0 var(--vnx-space-6, 24px);
}

.vnx-advertise-editor__meta {
  font-size: 13px;
  color: var(--vnx-color-muted, #6B6B7E);
  font-weight: 400;
}

.vnx-advertise-ai {
  background: var(--vnx-color-bg-soft, #F6F7FB);
  border: 1px dashed var(--vnx-color-border, #E3E3EA);
  border-radius: var(--vnx-radius-lg, 12px);
  padding: var(--vnx-space-4, 16px);
  margin-bottom: var(--vnx-space-4, 16px);
}

.vnx-advertise-ai h3 {
  margin-top: 0;
}

.vnx-advertise-ai__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--vnx-space-3, 12px);
  margin-bottom: var(--vnx-space-3, 12px);
}

.vnx-advertise-ai__grid input,
.vnx-advertise-ai__grid textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--vnx-color-border, #E3E3EA);
  border-radius: var(--vnx-radius-md, 8px);
  font: inherit;
}

.vnx-advertise-ai__hint,
.vnx-advertise-form__hint {
  font-size: 12px;
  color: var(--vnx-color-muted, #6B6B7E);
  margin-top: var(--vnx-space-2, 8px);
}

.vnx-advertise-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--vnx-space-3, 12px) var(--vnx-space-4, 16px);
}

.vnx-advertise-form__grid label:first-child,
.vnx-advertise-form__grid label:nth-child(4) {
  grid-column: 1 / -1;
}

.vnx-advertise-form__grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--vnx-color-muted, #6B6B7E);
}

.vnx-advertise-form__grid input[type="text"],
.vnx-advertise-form__grid input[type="url"],
.vnx-advertise-form__grid textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--vnx-color-border, #E3E3EA);
  border-radius: var(--vnx-radius-md, 8px);
  font: inherit;
  color: var(--vnx-color-text, #1A1A2E);
}

#vnx-ad-image-preview {
  max-width: 240px;
  border-radius: var(--vnx-radius-md, 8px);
  border: 1px solid var(--vnx-color-border, #E3E3EA);
  display: none;
}

#vnx-ad-image-preview[src] {
  display: block;
}

/* ── 状态行 ──────────────────────────────────────────────────── */
.vnx-ad-status {
  font-size: 13px;
  margin-left: var(--vnx-space-2, 8px);
}

/* ── 响应式 ──────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .vnx-advertise-form__grid {
    grid-template-columns: 1fr;
  }
  .vnx-advertise-form__grid label:nth-child(4) {
    grid-column: auto;
  }
  .vnx-advertise-table__actions .vnx-btn {
    margin-bottom: 4px;
  }
}
