/* Tarjetas Imprimibles — editor.css */

.ti-editor { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin: 24px 0; }

.ti-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) {
  .ti-grid { grid-template-columns: 1fr; }
}

/* Panels */
.ti-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.ti-panel-title {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 14px;
}

/* Field */
.ti-field { margin-bottom: 12px; }
.ti-field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 5px; }
.ti-field input[type="text"],
.ti-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: #1f2937;
  background: #fff;
  transition: border-color .15s;
}
.ti-field input:focus,
.ti-field textarea:focus { border-color: #1D9E75; outline: none; box-shadow: 0 0 0 3px rgba(29,158,117,.1); }
.ti-field textarea { resize: vertical; min-height: 52px; }

/* Designs */
.ti-designs { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 14px; }
.ti-design-opt {
  border: 1.5px solid #e5e7eb;
  border-radius: 7px;
  padding: 8px 6px;
  cursor: pointer;
  text-align: center;
  font-size: 11px;
  color: #6b7280;
  transition: border-color .15s;
}
.ti-design-opt.active { border-color: #1D9E75; color: #085041; font-weight: 600; }
.ti-thumb {
  width: 100%;
  aspect-ratio: 5/8;
  border-radius: 3px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Upload */
.ti-upload-area { margin-top: 4px; }
.ti-upload-label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 6px; }
.ti-dropzone {
  border: 1.5px dashed #d1d5db;
  border-radius: 7px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: background .15s;
}
.ti-dropzone:hover { background: #f9fafb; }
.ti-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ti-dropzone-text strong { display: block; font-size: 13px; color: #1f2937; margin-bottom: 2px; font-weight: 500; }
.ti-dropzone-text span { font-size: 11px; color: #9ca3af; }
.ti-img-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}
.ti-img-preview img { width: 38px; height: 54px; object-fit: cover; border-radius: 4px; border: 1px solid #e5e7eb; }
.ti-img-preview button { margin-left: auto; font-size: 11px; color: #dc2626; background: none; border: none; cursor: pointer; padding: 0; font-family: inherit; }

/* Slider rows */
.ti-slider-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.ti-slider-row label { font-size: 11px; color: #6b7280; white-space: nowrap; min-width: 62px; }
.ti-slider-row input[type="range"] { flex: 1; accent-color: #1D9E75; }

/* Pills */
.ti-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.ti-pill {
  padding: 5px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 11px;
  color: #6b7280;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.ti-pill.active { border-color: #1D9E75; background: #E1F5EE; color: #085041; font-weight: 500; }

/* Colors */
.ti-colors { display: flex; gap: 7px; flex-wrap: wrap; }
.ti-color {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s;
  flex-shrink: 0;
}
.ti-color.active { border-color: #1f2937; }

/* Preview */
.ti-preview-wrap {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.ti-preview-wrap canvas { width: 100%; display: block; border-radius: 4px; }

/* Buttons */
.ti-actions { display: flex; gap: 8px; width: 100%; }
.ti-btn {
  flex: 1;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.ti-btn:hover { background: #f9fafb; }
.ti-btn-pri { background: #1D9E75 !important; border-color: #1D9E75 !important; color: #fff !important; }
.ti-btn-pri:hover { background: #0F6E56 !important; }

.ti-hint { font-size: 11px; color: #9ca3af; text-align: center; margin: 0; }

@media print {
  .ti-editor .ti-controls,
  .ti-editor .ti-actions,
  .ti-editor .ti-hint { display: none !important; }
  .ti-preview-wrap { background: none; padding: 0; }
  canvas { width: 100% !important; }
}

/* ── Image mode tabs ── */
.ti-img-mode-tabs {
  display: flex; gap: 6px; margin-bottom: 12px;
}
.ti-mode-tab {
  flex: 1; padding: 8px 4px; border: 1px solid #d1d5db;
  border-radius: 7px; background: #fff; color: #6b7280;
  font-size: 11px; font-weight: 500; cursor: pointer;
  font-family: inherit; text-align: center; line-height: 1.4;
  transition: all .15s;
}
.ti-mode-tab:hover { background: #f9fafb; border-color: #9ca3af; }
.ti-mode-tab.active { border-color: #1D9E75; background: #E1F5EE; color: #085041; }
.ti-mode-icon { display: block; font-size: 16px; margin-bottom: 2px; }
.ti-mode-section { margin-bottom: 4px; }

/* ── Featured image preview ── */
.ti-featured-preview {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border: 1px solid #d1d5db; border-radius: 7px;
  background: #f9fafb;
}
.ti-featured-preview img {
  width: 48px; height: 64px; object-fit: cover;
  border-radius: 4px; border: 1px solid #e5e7eb; flex-shrink: 0;
}
.ti-featured-preview span { font-size: 12px; color: #6b7280; }
