/* Frontend UI */
.aiwyp-wrap{ max-width: 1060px; margin: 0 auto; }
.aiwyp-card{
  border:1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  background:#fff;
}
.aiwyp-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}
.aiwyp-grid--3{
  grid-template-columns: repeat(3, 1fr);
}
.aiwyp-field label{ display:block; font-weight:700; margin-bottom:6px; }
.aiwyp-field input[type="text"],
.aiwyp-field input[type="number"],
.aiwyp-field textarea{
  width:100%;
  border-radius: 12px;
  border:1px solid #d1d5db;
  padding: 10px 12px;
}
.aiwyp-help{ color:#6b7280; margin-top: 6px; font-size: 13px; }
.aiwyp-actions{ margin-top: 14px; display:flex; align-items:center; gap: 10px; }
.aiwyp-btn{
  border:none;
  background:#111827;
  color:#fff;
  padding:10px 16px;
  border-radius: 12px;
  cursor:pointer;
}
.aiwyp-status{ color:#374151; font-size: 14px; }
.aiwyp-progress{ margin-top: 14px; }
.aiwyp-progress__bar{ height: 10px; background:#e5e7eb; border-radius:999px; overflow:hidden; }
.aiwyp-progress__fill{ height: 100%; background:#111827; width:0%; }
.aiwyp-progress__text{ margin-top: 6px; color:#374151; font-size: 14px; }
.aiwyp-dropzone{
  border:2px dashed #d1d5db;
  border-radius: 16px;
  padding: 12px;
  background:#f9fafb;
}
.aiwyp-dropzone.is-drag{ border-color:#111827; background:#f3f4f6; }
.aiwyp-dropzone__hint{ color:#374151; font-size: 14px; }
.aiwyp-link{ border:none; background:none; color:#2563eb; cursor:pointer; padding:0; font-weight:700; }
.aiwyp-thumbs{
  display:flex; flex-wrap:wrap; gap: 10px;
  margin-top: 12px;
}
.aiwyp-thumb{
  width: 160px;
  border:1px solid #e5e7eb;
  border-radius: 14px;
  background:#fff;
  overflow:hidden;
}
.aiwyp-thumb.is-main{ outline: 2px solid #111827; }
.aiwyp-thumb img{ width:100%; height: 110px; object-fit: cover; display:block; }
.aiwyp-thumb__meta{ padding: 8px 10px; display:flex; flex-direction:column; gap:4px; }
.aiwyp-thumb__name{ font-size: 12px; color:#374151; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aiwyp-thumb__badge{ font-size: 12px; color:#6b7280; }
.aiwyp-thumb__actions{ display:flex; gap:6px; padding: 0 10px 10px; }
.aiwyp-mini{
  flex:1;
  border:1px solid #d1d5db;
  background:#fff;
  border-radius: 10px;
  padding:6px 8px;
  cursor:pointer;
  font-size: 12px;
}
.aiwyp-mini.danger{ border-color:#fecaca; color:#b91c1c; }
.aiwyp-advanced{
  margin-top: 12px;
  border:1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
  background:#f9fafb;
}
.aiwyp-advanced summary{ cursor:pointer; font-weight:700; }
.aiwyp-checks{ display:flex; flex-wrap:wrap; gap:10px; }
.aiwyp-range-val{ margin-top: 6px; color:#6b7280; font-size:13px; }

.aiwyp-autocomplete{ position:relative; }
.aiwyp-suggest{
  position:absolute;
  top: calc(100% + 6px);
  left:0; right:0;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius: 12px;
  overflow:hidden;
  z-index: 1000;
  max-height: 280px;
  overflow:auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.aiwyp-suggest__item{
  padding:10px 12px;
  border-bottom:1px solid #f3f4f6;
  cursor:pointer;
}
.aiwyp-suggest__item:hover{ background:#f9fafb; }
.aiwyp-suggest__name{ font-weight:700; color:#111827; }
.aiwyp-suggest__path{ font-size: 12px; color:#6b7280; margin-top: 2px; }

.aiwyp-results{ margin-top: 14px; }
.aiwyp-result{
  display:flex; gap: 12px;
  border:1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
  margin-top: 10px;
  align-items:center;
}
.aiwyp-result img{ width: 96px; height: 72px; object-fit:cover; border-radius: 10px; border:1px solid #e5e7eb; }
.aiwyp-result__title{ font-weight:700; margin-bottom: 4px; }

@media(max-width: 980px){
  .aiwyp-grid{ grid-template-columns: 1fr; }
  .aiwyp-grid--3{ grid-template-columns: 1fr; }
  .aiwyp-thumb{ width: 100%; max-width: 260px; }
}

/* Bootstrap 栅格辅助：不依赖 Bootstrap 时也尽量保持可读 */
.aiwyp-bs .aiwyp-card{ margin-top: 18px; }
.aiwyp-bs select, .aiwyp-bs input, .aiwyp-bs textarea{ width:100%; }
