/* STEDS Generador Etiqueta NOM-050 */
.steds-nom050-wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto 2.5rem auto;
  padding: 0 16px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  color: #0f172a;
}

.steds-nom050-wrap *,
.steds-nom050-wrap *::before,
.steds-nom050-wrap *::after {
  box-sizing: border-box;
}

.steds-nom050-shell {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  box-shadow: 0 18px 45px -18px rgba(16, 56, 117, 0.18);
  overflow: hidden;
}

/* Barra superior corporativa */
.steds-nom050-topbar {
  background: linear-gradient(135deg, #0d2c5e 0%, #1d4e8f 100%);
  color: #ffffff;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.steds-nom050-topbar-title {
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.steds-nom050-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}

/* Grid principal 2 columnas en PC */
.steds-nom050-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1.02fr) minmax(360px, 1.12fr);
  gap: 0;
  align-items: start;
}

/* Columna Izquierda: Formulario limpio sin textos largos */
.steds-nom050-form-col {
  padding: 22px 24px 24px;
  border-right: 1px solid #e2e8f0;
  background: #ffffff;
}

.steds-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}

.steds-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.steds-field.steds-full {
  grid-column: 1 / -1;
}

.steds-field > label {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.steds-opt-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.steds-input,
.steds-select,
.steds-textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  font-size: 13.5px;
  line-height: 1.35;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
  font-family: inherit;
}

.steds-textarea {
  min-height: 58px;
  resize: vertical;
}

.steds-input:focus,
.steds-select:focus,
.steds-textarea:focus {
  background: #ffffff;
  border-color: #1d4e8f;
  box-shadow: 0 0 0 3px rgba(29, 78, 143, 0.14);
}

.steds-input:disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

/* Prefijos bloqueados no editables */
.steds-prefixed {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  overflow: hidden;
  background: #f8fafc;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.steds-prefixed:focus-within {
  border-color: #1d4e8f;
  box-shadow: 0 0 0 3px rgba(29, 78, 143, 0.14);
  background: #ffffff;
}

.steds-prefix-lock {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: #e8eef7;
  color: #103875;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-right: 1px solid #cbd5e1;
  white-space: nowrap;
  user-select: none;
}

.steds-prefixed .steds-input,
.steds-prefixed .steds-select,
.steds-prefixed .steds-textarea {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.steds-contenido-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.steds-contenido-row .steds-qty {
  width: 96px;
  min-width: 78px;
  border-right: 1px solid #cbd5e1 !important;
  text-align: center;
  font-weight: 700;
}

.steds-contenido-row .steds-unit {
  flex: 1;
  min-width: 100px;
}

.steds-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  margin-top: 2px;
  user-select: none;
}

.steds-check-inline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #103875;
  cursor: pointer;
}

/* Dimensiones Alto x Ancho */
.steds-dims-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Subida de logo local */
.steds-logo-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.steds-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #eff6ff;
  color: #103875;
  border: 1.5px dashed #93c5fd;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.steds-file-btn:hover {
  background: #dbeafe;
}

.steds-file-clear {
  background: #fee2e2;
  color: #991b1b;
  border: none;
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.steds-divider {
  grid-column: 1 / -1;
  border: none;
  border-top: 1px dashed #cbd5e1;
  margin: 4px 0 2px;
}

/* Columna Derecha: Vista previa + Cálculo + Semáforo + Descargas */
.steds-nom050-preview-col {
  padding: 22px 24px 24px;
  background: #f8fafc;
  position: sticky;
  top: 24px;
}

/* Barra técnica NOM-030 */
.steds-nom030-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.steds-stat-pill {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
}

.steds-stat-pill .k {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.03em;
}

.steds-stat-pill .v {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #103875;
  margin-top: 2px;
}

.steds-stat-pill.steds-stat-highlight {
  background: #eff6ff;
  border-color: #93c5fd;
}

.steds-stat-pill.steds-stat-highlight .v {
  color: #0d2c5e;
  font-size: 16.5px;
}

/* Caja Etiqueta Real (fiel a la referencia limpia) */
.steds-label-stage {
  background: #e9eef5;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
}

.steds-label-card {
  width: 80%;
  max-width: 480px;
  margin: 0 auto;
  background: #ffffff;
  border: 2px solid #111111;
  padding: 16px 18px 14px;
  color: #000000;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.32;
  position: relative;
  min-height: 195px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: normal;
}

.steds-lbl-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.steds-lbl-product {
  font-size: 21px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.15;
  color: #000000;
  margin: 0;
}

.steds-lbl-logo-box {
  flex-shrink: 0;
  max-width: 110px;
  max-height: 54px;
  display: none;
}

.steds-lbl-logo-box img {
  max-width: 110px;
  max-height: 54px;
  object-fit: contain;
  display: block;
}

.steds-lbl-line {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
  margin: 3px 0;
  text-transform: uppercase;
}

.steds-lbl-line .steds-val-normal {
  font-weight: 700;
}

.steds-lbl-contenido-wrap {
  margin: 14px 0 10px;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.steds-lbl-contenido-prefix {
  font-size: 14px;
  font-weight: 700;
  color: #000000;
}

.steds-lbl-contenido-val {
  font-weight: 400;
  color: #000000;
  letter-spacing: 0.01em;
  line-height: 1.05;
  transition: font-size 0.15s ease;
}

.steds-lbl-warn {
  font-size: 12.5px;
  font-weight: 700;
  color: #000000;
  margin: 6px 0 4px;
  text-transform: uppercase;
}

.steds-lbl-legend {
  font-size: 13.5px;
  font-weight: 700;
  color: #000000;
  margin-top: 8px;
  text-transform: uppercase;
}

/* Panel Semáforo Técnico UVNOM225 (Siembra dudas técnicas reales) */
.steds-alerts-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #d97706;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.steds-alerts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.steds-alerts-title {
  font-size: 12px;
  font-weight: 800;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.steds-alerts-list {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
}

.steds-alerts-list li {
  font-size: 12px;
  line-height: 1.45;
  color: #78350f;
  margin-bottom: 5px;
}

.steds-alerts-list li:last-child {
  margin-bottom: 0;
}

.steds-alerts-list li.steds-alert-error {
  color: #991b1b;
  font-weight: 600;
}

/* Captura suave (opcionales) + Botones descarga */
.steds-download-box {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.steds-lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.steds-lead-caption {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 8px 0;
}

.steds-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.steds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.steds-btn:hover {
  transform: translateY(-1px);
}

.steds-btn:active {
  transform: translateY(0);
}

.steds-btn-jpg {
  background: linear-gradient(135deg, #103875 0%, #244E8A 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(16, 56, 117, 0.24);
}

.steds-btn-pdf {
  background: #0f172a;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.steds-btn-wa {
  width: 100%;
  background: linear-gradient(135deg, #25d366 0%, #16a34a 100%);
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.26);
  font-size: 13px;
}

.steds-disclaimer-mini {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #64748b;
  text-align: center;
}

.steds-disclaimer-mini a {
  color: #103875;
  text-decoration: underline;
}

.steds-toast {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  display: none;
}

/* Responsive móvil y tablet */
@media (max-width: 960px) {
  .steds-nom050-grid {
    grid-template-columns: 1fr;
  }
  .steds-nom050-form-col {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .steds-nom050-preview-col {
    position: static;
  }
}

@media (max-width: 600px) {
  .steds-nom050-wrap {
    padding: 0 8px;
  }
  .steds-nom050-form-col,
  .steds-nom050-preview-col {
    padding: 16px 14px;
  }
  .steds-field-grid,
  .steds-lead-row,
  .steds-btn-row,
  .steds-nom030-strip {
    grid-template-columns: 1fr;
  }
  .steds-label-card {
    width: 100%;
    max-width: 100%;
  }
  .steds-lbl-product {
    font-size: 18px;
  }
}

/* Expansión limpia a ancho completo dentro de entradas de blog (Blocksy / Gutenberg) */
@media (min-width: 1024px) {
  .entry-content .steds-nom050-wrap.alignfull {
    width: min(96vw, 1380px) !important;
    max-width: 1380px !important;
    margin-left: 50% !important;
    transform: translateX(-50%);
  }
}

/* === V1.1 LEGAL FOOTER & MODAL === */
.steds-unlocked-pill {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
  padding: 5px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.steds-legal-footer {
  background: #f1f5f9;
  border-top: 1px solid #dbe4f0;
  padding: 13px 22px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #475569;
  text-align: center;
}

.steds-legal-footer strong {
  color: #103875;
}

.steds-legal-footer a {
  color: #103875;
  font-weight: 700;
  text-decoration: underline;
}

/* Modal de registro en 2a descarga */
.steds-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.steds-modal-backdrop.is-open {
  display: flex;
}

.steds-modal-card {
  width: 100%;
  max-width: 470px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  animation: stedsPopIn 0.18s ease-out;
}

@keyframes stedsPopIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.steds-modal-hdr {
  background: linear-gradient(135deg, #0d2c5e 0%, #1d4e8f 100%);
  color: #ffffff;
  padding: 18px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.steds-modal-hdr h3 {
  margin: 0 0 4px 0;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.steds-modal-hdr p {
  margin: 0;
  font-size: 12.5px;
  color: #dbeafe;
  line-height: 1.4;
}

.steds-modal-close {
  background: rgba(255, 255, 255, 0.16);
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.steds-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.steds-modal-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steds-modal-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.steds-modal-field label {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.steds-modal-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 10px 11px;
  font-size: 11.5px;
  line-height: 1.42;
  color: #334155;
  cursor: pointer;
}

.steds-modal-consent input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #103875;
  flex-shrink: 0;
}

.steds-modal-consent a {
  color: #103875;
  font-weight: 700;
  text-decoration: underline;
}

.steds-modal-err {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
}

.steds-modal-submit {
  width: 100%;
  min-height: 46px;
  background: linear-gradient(135deg, #103875 0%, #244E8A 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 56, 117, 0.28);
}

.steds-modal-submit:hover {
  opacity: 0.96;
}

/* === V1.2 ZEBRA ULTRA PLUS & KIT STEDS MODAL === */
.steds-zebra-box {
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.5px solid #93c5fd;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.steds-zebra-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.steds-zebra-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0d2c5e;
  letter-spacing: -0.01em;
}

.steds-zebra-pill {
  display: inline-block;
  background: #103875;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.steds-kit-unlocked-pill {
  display: none;
  align-items: center;
  gap: 5px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 7px;
  margin-bottom: 8px;
}

.steds-zebra-size-row {
  margin-bottom: 9px;
}

.steds-zebra-size-row .steds-prefixed {
  background: #ffffff;
}

.steds-zebra-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.steds-btn-zebra-pdf {
  background: #1e293b;
  color: #ffffff !important;
  font-size: 12.5px;
  min-height: 40px;
  padding: 8px 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.steds-btn-zebra-zpl {
  background: #ffffff;
  color: #103875 !important;
  border: 1.5px solid #103875 !important;
  font-size: 12.5px;
  min-height: 40px;
  padding: 8px 10px;
}

.steds-btn-zebra-zpl:hover {
  background: #eff6ff;
}

.steds-zebra-note {
  margin: 7px 0 0 0;
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}

.steds-modal-card-kit {
  max-width: 520px;
}

.steds-kit-tag {
  display: inline-block;
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(186, 230, 253, 0.45);
  color: #e0f2fe;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.steds-modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 600px) {
  .steds-zebra-btn-row,
  .steds-modal-grid-2 {
    grid-template-columns: 1fr;
  }
}
