/* ===== 运营事务通知 - 发布/编辑弹窗美化 (v2) ===== */
/* 同时覆盖：自定义弹窗 (.icoa-pub-*) 和原始 el-dialog (.icoa-original-dialog) */

/* ---------- 自定义弹窗样式（保留，如果之前有自定义弹窗出现） ---------- */
.icoa-pub-overlay {
  position: fixed; inset: 0; z-index: 3100;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all .3s cubic-bezier(.645,.045,.355,1);
}
.icoa-pub-overlay.show { opacity: 1; visibility: visible; }
.icoa-pub-dialog {
  width: 720px; max-width: 94vw; max-height: 88vh;
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
  display: flex; flex-direction: column;
  transform: translateY(20px);
  transition: transform .35s cubic-bezier(.23,1,.32,1);
  overflow: hidden;
}
.icoa-pub-overlay.show .icoa-pub-dialog { transform: translateY(0); }

/* ===== 原始 el-dialog 美化 ===== */
.icoa-original-dialog {
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 40px rgba(0,0,0,.2) !important;
}

/* 深蓝渐变 header */
.icoa-dialog-header-enhanced,
.icoa-pub-header {
  background: linear-gradient(135deg, #1a3a5c, #1e5799) !important;
  color: #fff !important;
  padding: 17px 24px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}
.icoa-dialog-header-enhanced .el-dialog__title,
.icoa-pub-header h3 {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: #fff !important;
  margin: 0 !important;
}
.icoa-dialog-header-enhanced .el-dialog__headerbtn,
.icoa-pub-header .icoa-pub-close {
  width: 30px !important; height: 30px !important;
  border: none !important; background: rgba(255,255,255,.15) !important;
  cursor: pointer !important; font-size: 18px !important;
  color: rgba(255,255,255,.8) !important;
  border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  transition: .2s !important;
  top: auto !important; right: auto !important; position: static !important;
}
.icoa-dialog-header-enhanced .el-dialog__headerbtn:hover,
.icoa-pub-header .icoa-pub-close:hover {
  background: rgba(255,255,255,.25) !important; color: #fff !important;
}
.icoa-dialog-header-enhanced .el-dialog__headerbtn .el-icon {
  color: rgba(255,255,255,.8) !important;
}

/* 模式徽章 */
.icoa-pub-mode-enhanced {
  font-size: 11px; padding: 3px 10px;
  border-radius: 12px; font-weight: 500; margin-left: 10px;
  vertical-align: middle;
}
.icoa-pub-mode-enhanced.new { background: rgba(103,194,58,.25); color: #b6f0a0; }
.icoa-pub-mode-enhanced.edit { background: rgba(230,162,60,.25); color: #fad99e; }

/* body 美化 */
.icoa-dialog-body-enhanced {
  padding: 24px 28px !important;
}
.icoa-pub-body {
  padding: 24px 28px; overflow-y: auto; flex: 1;
  display: flex; flex-direction: column; gap: 20px;
}

/* footer 美化 */
.icoa-dialog-footer-enhanced {
  padding: 14px 24px !important;
  border-top: 1px solid #E4E7ED !important;
  background: #F5F7FA !important;
}
.icoa-pub-footer {
  padding: 14px 24px;
  border-top: 1px solid #E4E7ED;
  display: flex; justify-content: space-between; align-items: center;
  flex-shrink: 0; background: #F5F7FA;
}

/* ===== 原始 el-dialog 内表单元素美化 ===== */
.icoa-original-dialog .el-form-item__label {
  font-weight: 600 !important;
  color: #303133 !important;
}
.icoa-original-dialog .el-input__inner,
.icoa-original-dialog .el-textarea__inner {
  border-radius: 4px !important;
}
.icoa-original-dialog .el-input__inner:focus,
.icoa-original-dialog .el-textarea__inner:focus {
  border-color: #409EFF !important;
  box-shadow: 0 0 0 3px rgba(64,158,255,.12) !important;
}
.icoa-original-dialog .el-button--primary {
  background: #409EFF !important;
  border-color: #409EFF !important;
}
.icoa-original-dialog .el-button--primary:hover {
  background: #66b1ff !important;
  border-color: #66b1ff !important;
}

/* 自定义发布弹窗的其他样式 */
.icoa-pub-group { display: flex; flex-direction: column; gap: 6px; }
.icoa-pub-group label {
  font-size: 13px; font-weight: 600; color: #303133;
  display: flex; align-items: center; gap: 8px;
}
.icoa-req { color: #F56C6C; font-size: 14px; }
.icoa-opt { color: #C0C4CC; font-weight: 400; font-size: 12px; }
.icoa-hint { font-size: 12px; color: #909399; }
.icoa-pub-input, .icoa-pub-textarea, .icoa-pub-select {
  width: 100%; padding: 10px 14px;
  border: 1px solid #DCDFE6; border-radius: 4px;
  font-size: 14px; font-family: inherit; color: #303133;
  transition: border-color .2s, box-shadow .2s;
  background: #fff; outline: none;
}
.icoa-pub-input:focus, .icoa-pub-textarea:focus, .icoa-pub-select:focus {
  border-color: #409EFF; box-shadow: 0 0 0 3px rgba(64,158,255,.12);
}
.icoa-pub-textarea { resize: vertical; min-height: 180px; line-height: 1.7; }
.icoa-pub-select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23909399' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.icoa-pub-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.icoa-char-count { text-align: right; font-size: 12px; color: #C0C4CC; margin-top: 2px; }
.icoa-char-count.warn { color: #E6A23C; }
.icoa-char-count.over { color: #F56C6C; }
.icoa-toggle-row { display: flex; align-items: center; gap: 12px; }
.icoa-toggle {
  position: relative; width: 44px; height: 24px;
  background: #DCDFE6; border-radius: 12px;
  cursor: pointer; transition: background .25s; flex-shrink: 0;
}
.icoa-toggle.on { background: #409EFF; }
.icoa-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  transition: transform .25s cubic-bezier(.23,1,.32,1);
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.icoa-toggle.on::after { transform: translateX(20px); }
.icoa-toggle-label { font-size: 13px; color: #606266; }
.icoa-pub-toolbar {
  display: flex; gap: 2px; padding: 6px 10px;
  background: #F5F7FA; border: 1px solid #DCDFE6; border-bottom: none;
  border-radius: 4px 4px 0 0; flex-wrap: wrap;
}
.icoa-tb-sep { width: 1px; background: #DCDFE6; margin: 0 4px; }
.icoa-tb-hint { font-size: 11px; color: #C0C4CC; align-self: center; margin-left: auto; }
.icoa-pub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 20px; border-radius: 4px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1px solid #DCDFE6; background: #fff;
  color: #606266; transition: all .15s; white-space: nowrap;
}
.icoa-pub-btn:hover { border-color: #409EFF; color: #409EFF; }
.icoa-pub-btn.primary { background: #409EFF; border-color: #409EFF; color: #fff; }
.icoa-pub-btn.primary:hover { background: #66b1ff; border-color: #66b1ff; }
.icoa-pub-btn.success { background: #67C23A; border-color: #67C23A; color: #fff; }
.icoa-pub-btn.success:hover { background: #85ce61; border-color: #85ce61; }
.icoa-pub-right { display: flex; gap: 10px; }
.icoa-pub-left { font-size: 12px; color: #909399; }
.icoa-upload-zone {
  border: 2px dashed #DCDFE6; border-radius: 8px; padding: 24px;
  text-align: center; cursor: pointer; transition: all .2s;
}
.icoa-upload-zone:hover { border-color: #409EFF; background: #fafcff; }
.icoa-up-icon { font-size: 28px; color: #C0C4CC; margin-bottom: 6px; }
.icoa-up-text { font-size: 13px; color: #909399; }
.icoa-up-text strong { color: #409EFF; }
.icoa-up-hint { font-size: 11px; color: #C0C4CC; margin-top: 4px; }
.icoa-att-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.icoa-att-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: #F5F7FA;
  border-radius: 4px; font-size: 13px; border: 1px solid #E4E7ED;
}
.icoa-att-icon { font-size: 16px; flex-shrink: 0; }
.icoa-att-name { flex: 1; color: #303133; }
.icoa-att-size { font-size: 11px; color: #909399; }
.icoa-att-del {
  cursor: pointer; color: #C0C4CC; font-size: 14px;
  padding: 2px 6px; border-radius: 3px;
}
.icoa-att-del:hover { color: #F56C6C; background: #fef0f0; }
.icoa-pub-mode.new { background: rgba(103,194,58,.25); color: #b6f0a0; }
.icoa-pub-mode.edit { background: rgba(230,162,60,.25); color: #fad99e; }

@media (max-width: 768px) {
  .icoa-pub-dialog { width: 96vw; max-height: 92vh; }
  .icoa-pub-inline { grid-template-columns: 1fr; }
}
