/* Explicit control over whether template changes load samples or preserve edited content. */
.template-content-mode {
  display: grid;
  gap: 10px;
  margin: -4px 0 14px;
  padding: 12px;
  border: 1px solid #dce6f5;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff, #f8faff);
  box-shadow: 0 9px 24px rgba(39, 58, 101, .055);
}

.template-content-mode-copy {
  display: grid;
  gap: 3px;
}

.template-content-mode-copy strong {
  color: #263650;
  font-size: 11px;
  font-weight: 900;
}

.template-content-mode-copy small {
  color: #718098;
  font-size: 10px;
  line-height: 1.45;
}

.template-content-mode-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border: 1px solid #e0e7f2;
  border-radius: 12px;
  background: #f2f5fa;
}

.template-content-mode-actions button {
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #6a7890;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
  transition: background .17s ease, border-color .17s ease, color .17s ease, box-shadow .17s ease, transform .17s ease;
}

.template-content-mode-actions button:hover {
  color: #315fd9;
  transform: translateY(-1px);
}

.template-content-mode-actions button.is-active {
  border-color: #c7d6ff;
  background: #fff;
  color: #315fd9;
  box-shadow: 0 5px 14px rgba(49, 95, 217, .11);
}

.template-content-mode[data-mode="sample"] {
  border-color: #cbd9ff;
  background: linear-gradient(145deg, #fff, #f3f6ff);
}

.template-content-mode[data-mode="preserve"] {
  border-color: #cfe6dd;
  background: linear-gradient(145deg, #fff, #f3fbf7);
}

@media (max-width: 520px) {
  .template-content-mode-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .template-content-mode-actions button {
    transition: none !important;
  }
}