/* Template editor: settings and a live preview side by side (classes prefixed te-). Loaded last. */
body.te-open {
  overflow: hidden;
}
.te {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: #eef3f7;
}
.te-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--si-line);
  background: #fff;
}
.te-name {
  flex: 1;
  min-width: 180px;
}
.te-name input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--si-ink);
  font: 700 20px/1.2 inherit;
  font-family: inherit;
}
.te-name input:hover,
.te-name input:focus {
  border-color: var(--si-line);
  background: #fff;
}
.te-switch {
  margin: 0;
}
.te-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.te-views {
  display: none;
}
.te-body {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(380px, 540px) 1fr;
  min-height: 0;
}
.te-form {
  padding: 18px 20px 80px;
  overflow: auto;
}
.te-stage {
  padding: 16px;
  overflow: auto;
  background: #dde6ee;
}
.te-hint {
  margin: 0 0 10px;
  color: var(--si-muted);
  font-size: 13px;
  text-align: center;
}
.te-phone {
  width: min(100%, 430px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 40px rgb(20 40 60 / 25%);
}
.te-sections {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.te-section {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--si-line);
  border-radius: 10px;
  background: #fff;
}
.te-section-text small {
  display: block;
  color: var(--si-muted);
  font-size: 12.5px;
}
.te-section-actions {
  display: flex;
  gap: 4px;
}
.te-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.te-rights {
  display: grid;
  gap: 10px;
}
@media (max-width: 900px) {
  .te-head {
    padding: 8px 12px;
  }
  .te-views {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--si-line);
    background: #fff;
  }
  .te-body {
    grid-template-columns: 1fr;
  }
  .te-body[data-view='form'] .te-stage,
  .te-body[data-view='preview'] .te-form {
    display: none;
  }
  .te-section {
    grid-template-columns: auto 1fr;
  }
}
