/**
 * Journal Name in Email + Variable Override (modal + help tooltip)
 */

/* Scheme 2 temporarily hidden for handoff (el-row display:flex overrides [hidden]) */
.demo-scheme2-hidden,
.el-row.demo-scheme2-hidden {
  display: none !important;
}

/* Dev handoff callout — pink oval mark for scheme 1 build location */
.form_row.demo-dev-callout {
  position: relative;
  z-index: 1;
}

.form_row.demo-dev-callout::before {
  content: "";
  position: absolute;
  inset: -6px -8px;
  border: 3px solid #ff69b4;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

/* Help icon tooltip (Element-like) */
.demo-help-tip {
  position: relative;
}

.demo-help-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 320px;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #e4e7ed;
  background: #fff;
  color: #606266;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 2100;
}

.demo-help-tip::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: calc(100% + 4px);
  border: 6px solid transparent;
  border-top-color: #fff;
  filter: drop-shadow(0 1px 0 #e4e7ed);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  z-index: 2101;
}

.demo-help-tip:hover::after,
.demo-help-tip:focus::after,
.demo-help-tip:hover::before,
.demo-help-tip:focus::before {
  opacity: 1;
  visibility: visible;
}

.demo-scheme2-value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.demo-scheme2-name {
  font-weight: 600;
  color: #172b4d;
}

.demo-scheme2-arrow {
  color: #909399;
  margin: 0 2px;
}

.demo-scheme2-value .el-tag {
  margin: 0 4px 4px 0;
  font-family: Consolas, "Courier New", monospace;
}

.demo-modal-host[hidden] {
  display: none !important;
}

.demo-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 3000;
}

.demo-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  max-height: min(80vh, 640px);
  background: #fff;
  z-index: 3001;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.demo-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f5f7fa;
  border-bottom: 1px solid #e4e7ed;
}

.demo-modal__title {
  font-size: 16px;
  font-weight: 600;
  color: #303133;
}

.demo-modal__close {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #909399;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
}

.demo-modal__close:hover {
  color: #0156ce;
}

.demo-modal__body {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.demo-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 20px 20px;
  border-top: 1px solid #e4e7ed;
}

.demo-field {
  margin-bottom: 16px;
}

.demo-field:last-child {
  margin-bottom: 0;
}

.demo-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #303133;
}

.demo-field input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  color: #303133;
  outline: none;
}

.demo-field input[type="text"]:focus {
  border-color: #0156ce;
}

.demo-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.demo-switch-row__text {
  flex: 1;
  min-width: 0;
}

.demo-switch-row__text label {
  margin-bottom: 0;
  cursor: default;
}

.demo-switch {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #dcdfe6;
  cursor: pointer;
  transition: background-color 0.2s;
}

.demo-switch.is-checked {
  background: #0156ce;
}

.demo-switch__core {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.demo-switch.is-checked .demo-switch__core {
  transform: translateX(20px);
}

.demo-check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
}

.demo-check-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 400;
  font-size: 13px;
  cursor: pointer;
  color: #303133;
}

.demo-check-list input {
  flex-shrink: 0;
}

.demo-check-list code {
  font-family: Consolas, "Courier New", monospace;
  color: #0156ce;
  font-size: 12px;
}

.demo-btn {
  height: 32px;
  padding: 0 16px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #606266;
  font-family: inherit;
}

.demo-btn--primary {
  background: #0156ce;
  border-color: #0156ce;
  color: #fff;
}

.demo-btn--primary:hover:not(:disabled):not(.is-disabled) {
  background: #1a66d2;
  border-color: #1a66d2;
  color: #fff;
}

.demo-btn--primary:disabled,
.demo-btn--primary.is-disabled {
  background: #a0cfff;
  border-color: #a0cfff;
  color: #fff;
  cursor: not-allowed;
}
