/* 前台可视化编辑：管理员会话 + 会话内 portal_visual_edit（由 ?edit=1 开启，?edit=0 关闭） */
.swiper-slide.ve-banner-wrap { position: relative; }
.ve-toolbar {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 90%;
}
.ve-btn {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0,61,112,.9);
  background: rgba(255,255,255,.95);
  color: #003d70;
  cursor: pointer;
  line-height: 1.2;
}
.ve-btn:hover { background: #e8f0f8; }
.ve-banner-hint {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  max-width: 280px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  background: rgba(15,23,42,.92);
  color: #f8fafc;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.ve-banner-hint code { font-size: 11px; background: rgba(255,255,255,.12); padding: 2px 6px; border-radius: 4px; }
.ve-banner-hint .ve-exit-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: #93c5fd;
  text-decoration: underline;
}
.ve-banner-hint .ve-exit-link:hover { color: #bfdbfe; }

.ve-page-meta-strip {
  position: sticky;
  top: 0;
  z-index: 10050;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(90deg, #e0f2fe 0%, #f0f9ff 100%);
  border-bottom: 1px solid #bae6fd;
  font-size: 12px;
}
.ve-meta-tag {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 61, 112, 0.12);
  color: #003d70;
  font-weight: 600;
  font-size: 11px;
}

.ve-footer-panel,
.ve-head-nav-panel {
  margin: 0;
  padding: 8px 10px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 12px;
}
.ve-footer-panel__title,
.ve-head-nav-panel__title {
  font-weight: 700;
  margin-bottom: 6px;
  color: #93c5fd;
}
.ve-footer-panel__scroll,
.ve-head-nav-panel__scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-height: 140px;
  overflow-y: auto;
}

.ve-detail-toolbar {
  flex-wrap: wrap;
  gap: 4px;
  margin: 10px 0;
  padding: 8px;
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  border-radius: 6px;
  position: relative;
  z-index: 5;
}
.ve-rel { position: relative; }
.ve-rel > .ve-toolbar {
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 95%;
}
.b2b-stats-list > li { position: relative; }
.b2b-stats-list .ve-toolbar--stat {
  position: absolute;
  left: 2px;
  top: 2px;
  z-index: 5;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 98%;
}
.b2b-stats-list .ve-toolbar--stat .ve-btn { font-size: 10px; padding: 2px 5px; }
.ve-seo-strip .ve-btn { margin-right: 4px; margin-bottom: 4px; }
.in-news-list > li.ve-news-li { position: relative; }
.in-news-list .ve-toolbar--news { position: relative; z-index: 5; margin-bottom: 6px; flex-wrap: wrap; gap: 4px; }
.tabs2 span.ve-sol-tab { position: relative; }
.tabs2 .ve-toolbar--solnav { position: absolute; left: 0; top: 0; z-index: 8; flex-wrap: wrap; gap: 2px; max-width: 100%; }
.tabs2 .ve-toolbar--solnav .ve-btn { font-size: 10px; padding: 2px 4px; }

/* —— 浮层编辑 / 工具条 / 媒体库 —— */
.ve-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 26px;
  margin-right: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,61,112,.75);
  cursor: grab;
  flex-shrink: 0;
}
.ve-drag-handle:active { cursor: grabbing; }
.ve-drag-grip {
  width: 10px;
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    #64748b 0 2px,
    transparent 2px 4px
  );
  opacity: 0.85;
}

.ve-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100200;
  background: rgba(15, 23, 42, 0.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.ve-modal-overlay--open { display: flex; }
.ve-modal {
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  overflow: hidden;
}
.ve-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(90deg, #e0f2fe, #f0f9ff);
  border-bottom: 1px solid #bae6fd;
}
.ve-modal__title { font-size: 15px; font-weight: 700; color: #0f172a; padding-right: 12px; }
.ve-modal__close {
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #475569;
  padding: 0 4px;
}
.ve-modal__close:hover { color: #0f172a; }
.ve-modal__body {
  padding: 14px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}
.ve-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.ve-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.ve-plain-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  font-family: ui-monospace, Consolas, monospace;
  resize: vertical;
  min-height: 100px;
}
.ve-quill-editor {
  min-height: 220px;
  background: #fff;
}
.ve-quill-editor .ql-editor { min-height: 200px; font-size: 14px; }

.ve-btn--primary {
  background: var(--aiopc-primary, #003d70);
  color: #fff !important;
  border-color: var(--aiopc-primary, #003d70) !important;
}
.ve-btn--primary:hover { filter: brightness(1.05); }
.ve-btn--ghost {
  background: #f1f5f9;
  color: #334155 !important;
  border-color: #94a3b8 !important;
}
.ve-btn--secondary {
  font-size: 12px;
  background: #fff;
}

.ve-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.ve-upload-label {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--aiopc-accent, #005da3);
  color: #fff;
  cursor: pointer;
  border: 1px solid transparent;
}
.ve-upload-input { display: none; }
.ve-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.ve-media-item {
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: #e2e8f0;
}
.ve-media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ve-media-item--sel { border-color: var(--aiopc-primary, #003d70); box-shadow: 0 0 0 2px rgba(0,61,112,.2); }
.ve-hint { font-size: 12px; color: #64748b; margin-top: 8px; }

.ve-dock {
  position: fixed;
  left: 10px;
  bottom: 100px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ve-dock__btn {
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,61,112,.85);
  background: rgba(255,255,255,.97);
  color: var(--aiopc-primary, #003d70);
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.ve-dock__btn:hover { background: #e8f0f8; }

.ve-theme-pop {
  position: fixed;
  left: 10px;
  bottom: 268px;
  z-index: 9998;
  width: 260px;
  max-width: calc(100vw - 24px);
}
.ve-theme-pop__inner {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  border: 1px solid #e2e8f0;
}
.ve-theme-pop__tit {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #0f172a;
}
.ve-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #475569;
}
.ve-theme-row input[type="color"] {
  width: 48px;
  height: 32px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
}
.ve-theme-save {
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-weight: 600;
}

.ve-log-pop {
  position: fixed;
  left: 10px;
  bottom: 268px;
  z-index: 9998;
  width: 300px;
  max-width: calc(100vw - 24px);
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  border: 1px solid #e2e8f0;
  font-size: 12px;
}
.ve-log-pop ul { margin: 0; padding-left: 18px; color: #334155; }
.ve-log-pop li { margin-bottom: 6px; }

.ve-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 100250;
  padding: 12px 20px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.ve-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
