/* ══════════════════════════════════════════════════
   Letras Poster Generator v7 — letras-poster.css
   ══════════════════════════════════════════════════ */

.lp-wrap *, .lp-wrap *::before, .lp-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}

/* Layout: poster arriba centrado, formulario abajo */
.lp-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1.2rem !important;
  padding: 1rem 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  grid-template-columns: none !important;
}

/* ── Poster ───────────────────────────────────────── */
.lp-poster-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lp-col-header {
  font-size: 10px; font-weight: 700; color: #999;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 8px; text-align: center;
}

.lp-poster-outer {
  display: inline-block;
  border: 6px solid #111;
  background: #111;
}

.lp-poster {
  width: 240px; background: #fff;
  padding: 18px 16px 12px;
  display: flex; flex-direction: column; align-items: center;
}

.lp-t1 {
  font-size: 38px; font-weight: 900; letter-spacing: -2px;
  line-height: 1; text-transform: uppercase; text-align: center;
  font-family: 'Arial Black', Arial, sans-serif; color: #111;
}
.lp-t2 {
  font-size: 11px; text-align: center; margin-top: 2px;
  margin-bottom: 8px; font-family: Arial, sans-serif; color: #111;
}
.lp-divider { width: 55%; height: 0.5px; background: #bbb; margin: 2px 0 10px; }

.lp-circle-wrap { width: 130px; height: 130px; margin-bottom: 10px; flex-shrink: 0; }
#lp-route-canvas { display: block; border-radius: 50%; }

.lp-name {
  font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; text-align: center;
  margin-bottom: 8px; font-family: Arial, sans-serif; color: #111;
}

.lp-stats {
  display: flex; flex-direction: row; justify-content: center;
  align-items: flex-start; flex-wrap: nowrap;
  gap: 8px; margin-bottom: 8px; width: 100%;
}
.lp-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lp-stat-ico { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.lp-stat-ico svg { width: 16px; height: 16px; }
.lp-stat-val {
  font-size: 7px; font-weight: 700; text-align: center;
  font-family: Arial, sans-serif; line-height: 1.3;
  white-space: nowrap; color: #111;
}
.lp-logo { width: 22px; height: 22px; }
.lp-logo svg { width: 22px; height: 22px; }

/* ── Columna derecha (todo el formulario) ─────────── */
.lp-right-col { width: 100% !important; max-width: 560px !important; }

/* ── Variantes ────────────────────────────────────── */
.lp-variants-bar {
  display: flex;
  flex-direction: row;
  gap: 16px;
  margin-bottom: 10px;
  padding: 8px 10px;
  background: #f7f7f7;
  border-radius: 7px;
  border: 1px solid #e8e8e8;
}

.lp-variant-label {
  display: block;
  font-size: 9px; font-weight: 700; color: #999;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 5px;
}

.lp-variant-options { display: flex; gap: 6px; flex-wrap: wrap; }

.lp-vopt {
  display: flex; align-items: center; cursor: pointer;
  padding: 4px 10px; border-radius: 5px;
  border: 1.5px solid #ddd; background: #fff;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.lp-vopt input[type="radio"] { display: none; }
.lp-vopt-label { font-size: 11px; font-weight: 600; color: #555; line-height: 1.2; }
.lp-vopt-label em {
  display: block; font-style: normal;
  font-size: 9px; font-weight: 400; color: #aaa; margin-top: 1px;
}
.lp-vopt--active { border-color: #111; background: #111; }
.lp-vopt--active .lp-vopt-label { color: #fff; }
.lp-vopt--active .lp-vopt-label em { color: rgba(255,255,255,0.5); }
.lp-vopt:hover:not(.lp-vopt--active) { border-color: #999; }

/* ── Sub-header ───────────────────────────────────── */
.lp-sub-header {
  font-size: 9px; font-weight: 700; color: #999;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding-bottom: 5px; border-bottom: 1px solid #e5e5e5;
  margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.lp-sub-header-right { color: #bbb; }

/* ── Grid de campos: 2 columnas ───────────────────── */
.lp-fields-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px 14px !important;
}

/* Campos que ocupan ancho completo */
.lp-field-full { grid-column: 1 / -1; }

@media (max-width: 480px) {
  .lp-fields-grid { grid-template-columns: 1fr; }
  .lp-field-full { grid-column: 1; }
}

/* ── Campo individual ─────────────────────────────── */
.lp-field { display: flex; flex-direction: column; }

/* Fila label + swatch */
.lp-field-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 2px !important;
  min-height: 16px !important;
}

.lp-field-row > label:first-child,
.lp-field > label {
  font-size: 10px; color: #666; line-height: 1;
}

.lp-optional { color: #bbb; font-size: 9px; }

.lp-field input[type="text"],
.lp-field input[type="date"] {
  width: 100%; padding: 5px 8px; font-size: 12px;
  border: 1px solid #e0e0e0; border-radius: 5px;
  background: #fff; color: #111; outline: none;
  transition: border-color 0.15s;
}
.lp-field input[type="text"]:focus,
.lp-field input[type="date"]:focus { border-color: #888; }
.lp-field input::placeholder { color: #ccc; }

/* Swatch en la misma fila que el label */
.lp-swatch {
  display: block; width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid rgba(0,0,0,0.12);
  overflow: hidden; position: relative; cursor: pointer;
}
.lp-swatch input[type="color"] {
  position: absolute; inset: -4px;
  width: calc(100% + 8px); height: calc(100% + 8px);
  opacity: 0; cursor: pointer; border: none; padding: 0;
}

/* GPX */
.lp-gpx-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 5px 10px; font-size: 11px;
  border: 1.5px dashed #ccc; border-radius: 5px;
  color: #888; cursor: pointer; transition: border-color 0.15s, color 0.15s;
  text-align: center;
}
.lp-gpx-btn:hover { border-color: #111; color: #111; }
.lp-gpx-btn.lp-gpx-loaded { border-color: #2d7a2d; color: #2d7a2d; border-style: solid; }
.lp-gpx-hint { font-size: 9px; color: #bbb; margin-top: 2px; }

/* ── Botón carrito ────────────────────────────────── */
.lp-cart-area { margin-top: 10px; }

.lp-btn-cart {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 20px;
  background: #111; color: #fff;
  border: none; border-radius: 7px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.lp-btn-cart:hover { background: #333; }
.lp-btn-cart:disabled { opacity: 0.6; cursor: not-allowed; }

.lp-spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: lp-spin 0.7s linear infinite;
}
@keyframes lp-spin { to { transform: rotate(360deg); } }

.lp-msg {
  margin-top: 8px; padding: 8px 12px;
  border-radius: 5px; font-size: 12px;
}
.lp-msg.lp-success { background: #eaf5ea; color: #2d6e2d; border: 1px solid #b5ddb5; }
.lp-msg.lp-error   { background: #fdf0f0; color: #a33;    border: 1px solid #f0bbbb; }
.lp-msg a { color: inherit; font-weight: 600; }


/* ══════════════════════════════════════════════════
   LAYOUT MINI — círculo arriba, título grande abajo
   ══════════════════════════════════════════════════ */

.lp-poster--mini {
  width: 240px;
  padding: 20px 20px 16px;
}

/* Círculo más arriba, sin margen inferior grande */
.lp-poster--mini .lp-circle-wrap {
  width: 200px !important;
  height: 200px !important;
  margin-bottom: 16px;
}

.lp-poster--mini #lp-route-canvas {
  width: 200px !important;
  height: 200px !important;
}

/* Título muy grande */
.lp-poster--mini .lp-t1 {
  font-size: 52px !important;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 2px;
  order: 2;
}

/* Subtítulo debajo del título */
.lp-poster--mini .lp-t2 {
  font-size: 14px !important;
  margin-top: 0;
  margin-bottom: 14px;
  order: 3;
}

/* Divider oculto en mini */
.lp-poster--mini .lp-divider {
  display: none !important;
}

/* Nombre oculto en mini (ya va el título grande) */
.lp-poster--mini .lp-name {
  display: none !important;
}

/* Stats en fila con más espacio */
.lp-poster--mini .lp-stats {
  gap: 14px !important;
  margin-bottom: 14px;
  order: 4;
}

.lp-poster--mini .lp-stat-ico svg {
  width: 22px !important;
  height: 22px !important;
}

.lp-poster--mini .lp-stat-val {
  font-size: 10px !important;
}

/* Logo al final */
.lp-poster--mini .lp-logo {
  order: 5;
  width: 28px !important;
  height: 28px !important;
}
.lp-poster--mini .lp-logo svg {
  width: 28px !important;
  height: 28px !important;
}

/* Reordenar flex para: círculo, t1, t2, stats, logo */
.lp-poster--mini {
  flex-direction: column;
}

.lp-poster--mini .lp-circle-wrap { order: 1; }
.lp-poster--mini .lp-t1          { order: 2; }
.lp-poster--mini .lp-t2          { order: 3; }
.lp-poster--mini .lp-stats        { order: 4; }
.lp-poster--mini .lp-logo         { order: 5; }
