/**
 * AI 内容区专用样式（scoped）
 * 仅作用于 .aiweb-wrapper 与 #zoomModal，不污染 header/footer
 */
#mvpAiTemplate .aiweb-wrapper,
#mvpAiTemplate .aiweb-wrapper *,
#mvpAiTemplate .aiweb-wrapper *::before,
#mvpAiTemplate .aiweb-wrapper *::after,
#mvpAiTemplate #zoomModal,
#mvpAiTemplate #zoomModal *,
#mvpAiTemplate #zoomModal *::before,
#mvpAiTemplate #zoomModal *::after {
  box-sizing: border-box;
}

/* Grid */
#mvpAiTemplate .aiweb-wrapper .row {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 0;
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(-1 * var(--bs-gutter-y));
  margin-right: calc(-0.5 * var(--bs-gutter-x));
  margin-left: calc(-0.5 * var(--bs-gutter-x));
}

#mvpAiTemplate .aiweb-wrapper .row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  margin-top: var(--bs-gutter-y);
}

#mvpAiTemplate .aiweb-wrapper .g-4,
#mvpAiTemplate .aiweb-wrapper .gx-4 {
  --bs-gutter-x: 1.5rem;
}

#mvpAiTemplate .aiweb-wrapper .g-4,
#mvpAiTemplate .aiweb-wrapper .gy-4 {
  --bs-gutter-y: 1.5rem;
}

#mvpAiTemplate .aiweb-wrapper .col-12 {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 576px) {
  #mvpAiTemplate .aiweb-wrapper .col-sm-6 {
    flex: 0 0 auto;
    width: 50%;
  }
}

/* Nav tabs */
#mvpAiTemplate .aiweb-wrapper .nav {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

#mvpAiTemplate .aiweb-wrapper .nav-item {
  list-style: none;
}

#mvpAiTemplate .aiweb-wrapper button.nav-link {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* Buttons & utilities */
#mvpAiTemplate .aiweb-wrapper .btn {
  display: inline-block;
  padding: 0.5rem 0.85rem;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

#mvpAiTemplate .aiweb-wrapper .btn-secondary {
  color: #fff;
  background-color: #98a2b3;
  border-color: #98a2b3;
}

#mvpAiTemplate .aiweb-wrapper .btn-secondary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

#mvpAiTemplate .aiweb-wrapper .w-100 {
  width: 100%;
}

#mvpAiTemplate .aiweb-wrapper .text-secondary {
  color: #667085;
}

#mvpAiTemplate .aiweb-wrapper .small {
  font-size: 13px;
}

/* Modal（Bootstrap JS 依赖） */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal-backdrop.show {
  opacity: 0.5;
}

#mvpAiTemplate #zoomModal.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

#mvpAiTemplate #zoomModal.modal.show {
  display: block;
}

#mvpAiTemplate #zoomModal.modal.fade {
  transition: opacity 0.15s linear;
}

#mvpAiTemplate #zoomModal.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

#mvpAiTemplate #zoomModal.modal.show .modal-dialog {
  transform: none;
}

#mvpAiTemplate #zoomModal .modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem auto;
  pointer-events: none;
}

#mvpAiTemplate #zoomModal .modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 3.5rem);
}

#mvpAiTemplate #zoomModal .modal-xl {
  max-width: 1140px;
}

#mvpAiTemplate #zoomModal .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  outline: 0;
}

#mvpAiTemplate #zoomModal .modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #e3e7ee;
}

#mvpAiTemplate #zoomModal .modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

#mvpAiTemplate #zoomModal .modal-body.p-0 {
  padding: 0;
}

#mvpAiTemplate #zoomModal .modal-footer {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
  border-top: 1px solid #e3e7ee;
}

#mvpAiTemplate #zoomModal .modal-title {
  margin: 0;
  line-height: 1.5;
}

#mvpAiTemplate #zoomModal .fs-5 {
  font-size: 1.25rem;
}

#mvpAiTemplate #zoomModal .mb-0 {
  margin-bottom: 0;
}

#mvpAiTemplate #zoomModal .btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em;
  border: 0;
  border-radius: 0.375rem;
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  opacity: 0.5;
  cursor: pointer;
}

#mvpAiTemplate #zoomModal .btn-close:hover {
  opacity: 0.75;
}
