/* AutrixWeb — layout.css: Capa layout tardía (sidebar, main, forms, conexión, wizard, idioma).
 * Rango contiguo 8772-9475 del antiguo styles.css: el orden relativo
 * se conserva para no alterar la cascada. */
/* ---- Sidebar ---- */
body.authed .sidebar {
  background: rgba(13, 20, 40, 0.92);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--card-border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}
body.authed .sidebar-header {
  background: transparent;
  border-bottom: 1px solid var(--card-border);
  padding: 20px 20px 14px;
}
body.authed .sidebar-header h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body.authed .sidebar-header h1::after {
  content: "Control en la nube";
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  -webkit-text-fill-color: var(--muted-dim);
  margin-top: 4px;
}
body.authed .sidebar-nav {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.authed .sidebar-nav li { border-bottom: none; }
body.authed .sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
}
body.authed .sidebar-nav a i {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent1);
  margin-right: 0;
  font-size: 14px;
}
body.authed .sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-color: var(--card-border);
}
body.authed .sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(167, 139, 250, 0.45);
  border-left: 1px solid rgba(167, 139, 250, 0.45);
  box-shadow: inset 3px 0 0 var(--accent2);
}
body.authed .mode-row {
  margin: 10px 14px 4px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 8px 10px;
}
body.authed .sidebar-active-dev {
  margin: 6px 14px 4px;
  background: rgba(44, 90, 160, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
body.authed .sidebar-active-dev strong { color: #fff; }
body.authed .sidebar-active-dev .pill { float: right; }
body.authed .sidebar .sidebar-canvas-container {
  background: #05080f;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin: 8px 14px;
  padding: 8px;
}
body.authed .sidebar input#dev_ip { display: none; }
body.authed .sidebar-account {
  border-top: 1px solid var(--card-border);
  color: var(--muted);
}
body.authed .sidebar-account > i { color: var(--accent1); }
body.authed .sidebar-logout { color: var(--muted-dim); }
body.authed .sidebar-logout:hover { color: var(--accent3); }

/* ---- Main + cards ---- */
body.authed .main-content { background: transparent; }
body.authed .header,
body.authed .section-container,
body.authed .status-container,
body.authed .status-preview,
body.authed .loop-controls,
body.authed .brightness-controls,
body.authed .moodlight-controls,
body.authed .sub-section,
body.authed .widget-card,
body.authed .widgets-gallery-single .widget-card-inline-form,
body.authed .modal-dialog {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  color: var(--ink);
}
body.authed .section h3 {
  color: #fff;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
body.authed .section h3 i { color: var(--accent1); }
body.authed .section-container h4,
body.authed .sub-section h4,
body.authed .loop-header h4,
body.authed .brightness-header h4,
body.authed .moodlight-header h4 { color: #fff; }
body.authed label { color: var(--muted); }
body.authed small, body.authed .sound-description,
body.authed .melody-description { color: var(--muted-dim); }
body.authed p { color: var(--muted); }

/* ---- Forms + buttons ---- */
body.authed input, body.authed select, body.authed textarea {
  background: rgba(5, 8, 15, 0.65);
  border: 1px solid var(--card-border);
  color: var(--ink);
  border-radius: 10px;
}
body.authed input::placeholder, body.authed textarea::placeholder { color: #64748b; }
body.authed input:focus, body.authed select:focus, body.authed textarea:focus {
  outline: none;
  border-color: var(--accent1);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25);
}
body.authed select option { background: #0d1428; color: var(--ink); }
body.authed button, body.authed .modal-button--primary,
body.authed .widget-card-btn, body.authed .widget-inline-send-btn {
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
}
body.authed button:hover, body.authed .modal-button--primary:hover,
body.authed .widget-card-btn:hover, body.authed .widget-inline-send-btn:hover {
  background: linear-gradient(90deg, #1d4ed8, #6d28d9);
  filter: brightness(1.08);
}
body.authed .modal-button--secondary, body.authed .brightness-preset-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--ink);
}
body.authed .modal-button--secondary:hover { background: rgba(255, 255, 255, 0.14); }
body.authed .result {
  background: rgba(5, 8, 15, 0.7);
  border: 1px solid var(--card-border);
  color: var(--muted);
}
body.authed .control-container, body.authed .power-toggle-container,
body.authed .sound-toggle-container {
  background: rgba(5, 8, 15, 0.55);
  border: 1px solid var(--card-border);
}
body.authed .volume-control-container {
  background: rgba(5, 8, 15, 0.55) !important;
  border: 1px solid var(--card-border) !important;
}
body.authed .volume-control-container i, body.authed #volume_value { color: var(--muted) !important; }

/* Pills + badges */
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.pill--lan { background: rgba(34, 197, 94, 0.18); border-color: rgba(34,197,94,.5); color: #86efac; }
.pill--cloud { background: rgba(96, 165, 250, 0.18); border-color: rgba(96,165,250,.5); color: #bfdbfe; }
/* ---- Conexión ---- */
.conn-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 4px; }
.conn-step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px;
}
.conn-step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  color: #fff; font-weight: 800; font-size: 13px; margin-bottom: 6px;
}
.conn-step strong { display: block; color: #fff; margin-bottom: 2px; font-size: 13px; }
.conn-step span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.conn-hint {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.5;
}
.conn-ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #bbf7d0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  margin-top: 8px;
  line-height: 1.5;
}
/* ---- Firmware NG >=1.1.1 banner (landing + Conexión + wizard) ---- */
.fw-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(239, 68, 68, 0.14);
  border: 2px solid rgba(239, 68, 68, 0.75);
  color: #fecaca;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.55;
  margin: 14px auto 0;
  max-width: 640px;
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.25);
}
.fw-banner > i {
  font-size: 20px;
  color: #fbbf24;
  margin-top: 2px;
  flex-shrink: 0;
}
.fw-banner a {
  color: #fde68a;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fw-banner a:hover { color: #fff7ed; }
.fw-banner--compact {
  margin: 0 0 12px;
  max-width: none;
  font-size: 13px;
}
.conn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.conn-row input { flex: 1; min-width: 160px; }
.conn-row input#dev_ip { flex: 0 1 220px; min-width: 0; max-width: 260px; }
.connect-button.device-connect-button { width: auto; min-width: 0; height: 44px; padding: 0 18px; gap: 8px; white-space: nowrap; flex-shrink: 0; }
.pass-eye-btn { flex-shrink: 0; width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #e5e7eb; cursor: pointer; }
.pass-eye-btn:hover { background: rgba(255,255,255,.12); }

/* ---- Wizard ---- */
.wizard-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 18px;
}
.wizard-overlay.open { display: flex; }
.wizard-card {
  width: 100%; max-width: 620px;
  background: linear-gradient(180deg, #141d38, #0d1428);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  color: var(--ink);
  overflow: hidden;
}
.wizard-head { padding: 20px 22px 0; }
.wizard-badge {
  display: inline-block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255,255,255,.22);
  padding: 5px 12px; border-radius: 999px; color: var(--muted); margin-bottom: 10px;
}
.wizard-head h2 { margin: 0 0 6px; font-size: 24px; }
.wizard-head h2 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent1), var(--accent2), var(--accent3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wizard-head p { margin: 0; font-size: 13px; }
.wizard-dots { display: flex; gap: 6px; margin: 14px 0 0; }
.wizard-dots span { height: 6px; flex: 1; border-radius: 999px; background: rgba(255,255,255,.12); }
.wizard-dots span.on { background: linear-gradient(90deg, var(--accent1), var(--accent2)); }
.wizard-body { padding: 18px 22px; font-size: 13px; line-height: 1.6; }
.wizard-body input, .wizard-body select { margin-top: 8px; }
.wizard-check { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.wizard-check li {
  background: rgba(255,255,255,.05); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 8px 10px; font-size: 12px; color: var(--muted);
}
.wizard-check li b { color: #fff; }
.wizard-foot {
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  padding: 0 22px 20px;
}
.wizard-status { font-size: 12px; color: var(--muted); margin-top: 10px; min-height: 18px; }

@media (max-width: 860px){
  body.authed .sidebar { width: 100%; height: auto; position: static; }
  body.authed .main-content { margin-left: 0; }
  .conn-steps { grid-template-columns: 1fr; }
  .wizard-head h2 { font-size: 20px; }
}

/* Language switch EN/ES (persisted in localStorage awtrix_lang_v1) */
.lang-switch { display: flex; align-items: center; gap: 6px; }
.lang-switch--sidebar { justify-content: center; padding: 10px 0 8px; margin-top: auto; }
.lang-switch--landing { justify-content: flex-start; margin-top: 12px; }
.lang-switch-label { font-size: 12px; opacity: .8; }
.lang-btn {
  border: 1px solid rgba(255,255,255,.25); background: transparent; color: inherit;
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.lang-btn.active { background: #fff; color: #111; border-color: #fff; }
.lang-switch--landing .lang-btn.active { background: #111; color: #fff; border-color: #111; }

/* ===========================================
   TEXT DESIGNER — quick text + modal.
   Nativo del tema oscuro (body.authed): cajas oscuras,
   texto claro y acentos del tema. Layout blindado con
   !important frente a las reglas row antiguas.
   =========================================== */
.widget-card.text-designer,
body.authed .widgets-gallery-single .widget-card-inline-form.text-designer,
body.authed .widget-card.text-designer {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  text-align: left;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 20px;
  gap: 14px;
  border-top: 4px solid var(--accent1, #60a5fa);
}
.text-designer .widget-card-header-inline {
  flex: none !important;
  width: 100%;
  align-items: center;
}
.text-designer-title { min-width: 0; }
.text-designer-title h4 { color: #fff; font-size: 19px !important; margin: 0; }
body:not(.authed) .text-designer-title h4 { color: #0f172a !important; }
.text-designer-sub {
  margin: 2px 0 0 !important;
  color: var(--muted-dim, #93a0c4) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  flex: none !important;
}
.text-designer-grid {
  display: grid !important;
  width: 100%;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
  align-items: start;
}
.text-designer--modal .text-designer-grid { grid-template-columns: 1fr; }
.text-designer-main, .text-designer-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.text-designer-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.text-designer-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink, #eef2ff);
}
body:not(.authed) .text-designer-label { color: #0f172a; }
.text-designer-label > span:first-child { display: flex; align-items: center; gap: 6px; }
.text-designer-label i { color: var(--accent1, #60a5fa); margin: 0; }
body:not(.authed) .text-designer-label i { color: #1d4ed8; }
.text-designer-count { font-style: normal; font-weight: 700; font-size: 12px; color: var(--muted-dim, #93a0c4); }
.text-designer-input {
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  background: rgba(5, 8, 15, 0.65) !important;
  color: var(--ink, #eef2ff) !important;
  font-weight: 600;
  padding: 12px 14px !important;
  font-size: 15px !important;
}
body:not(.authed) .text-designer-input {
  border: 2px solid #334155 !important;
  background: #fff !important;
  color: #0f172a !important;
}
.text-designer-input:focus {
  border-color: var(--accent1, #60a5fa) !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25) !important;
}
.text-designer-preview-wrap { display: flex; flex-direction: column; gap: 6px; }
.text-led-preview {
  position: relative;
  background: #000;
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 10px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  overflow: hidden;
}
.text-led-preview span {
  font-family: "Courier New", ui-monospace, monospace;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 2px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.text-led-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 4px);
}
.text-designer-box {
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  background: rgba(5, 8, 15, 0.5);
  padding: 12px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
body:not(.authed) .text-designer-box {
  border: 2px solid #94a3b8;
  background: #fff;
}
.text-designer-box legend {
  background: linear-gradient(90deg, var(--accent1, #60a5fa), var(--accent2, #a78bfa));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
}
.text-designer-box legend i { margin-right: 4px; }
.text-designer .widget-inline-colors { gap: 10px; }
.text-designer .widget-inline-color-label {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.12)) !important;
  padding: 10px !important;
  gap: 8px !important;
}
body:not(.authed) .text-designer .widget-inline-color-label {
  background: #fff !important;
  border: 2px solid #475569 !important;
}
.text-designer .widget-inline-color-label > span {
  color: var(--ink, #eef2ff) !important;
  font-size: 13px !important;
}
body:not(.authed) .text-designer .widget-inline-color-label > span { color: #0f172a !important; }
.text-designer .widget-inline-color-label > span i { color: var(--accent1, #60a5fa) !important; }
.text-hex {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.12));
  color: var(--ink, #eef2ff);
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 5px;
}
body:not(.authed) .text-hex { background: #0f172a; border: none; color: #fff; }
.text-designer .widget-inline-color-input {
  height: 42px !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 8px !important;
  padding: 3px !important;
  background: transparent !important;
}
body:not(.authed) .text-designer .widget-inline-color-input { border: 2px solid #0f172a !important; background: #fff !important; }
.text-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.text-preset {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s;
}
body:not(.authed) .text-preset { border-color: #0f172a; }
.text-preset:hover { transform: scale(1.2); }
.text-preset.active { outline: 3px solid var(--accent1, #60a5fa); outline-offset: 1px; }
.text-designer .widget-inline-expire {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid var(--card-border, rgba(255, 255, 255, 0.12)) !important;
  padding: 10px 12px !important;
}
body:not(.authed) .text-designer .widget-inline-expire {
  background: #fff !important;
  border: 2px solid #475569 !important;
}
.text-designer .widget-inline-expire-toggle { color: var(--ink, #eef2ff) !important; font-size: 13px !important; }
body:not(.authed) .text-designer .widget-inline-expire-toggle { color: #0f172a !important; }
.text-designer .widget-inline-expire-toggle span i { color: var(--accent1, #60a5fa) !important; }
.text-designer .widget-inline-expire-input {
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  background: rgba(5, 8, 15, 0.65) !important;
  color: var(--ink, #eef2ff) !important;
  font-weight: 700;
  width: 68px !important;
  padding: 7px 6px !important;
  font-size: 15px !important;
}
body:not(.authed) .text-designer .widget-inline-expire-input {
  border: 2px solid #334155 !important;
  background: #fff !important;
  color: #0f172a !important;
}
.text-designer .widget-inline-expire-input:focus {
  border-color: var(--accent1, #60a5fa) !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25) !important;
}
.text-designer .widget-inline-expire-unit { color: var(--muted, #c7d2fe) !important; }
body:not(.authed) .text-designer .widget-inline-expire-unit { color: #0f172a !important; }
.text-designer-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.text-designer-mini { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 13px; font-weight: 700; color: var(--ink, #eef2ff); }
body:not(.authed) .text-designer-mini { color: #0f172a; }
.text-designer-mini > span { display: flex; align-items: center; gap: 6px; }
.text-designer-mini > span i { color: var(--accent1, #60a5fa); }
.text-designer-select {
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 10px;
  background: rgba(5, 8, 15, 0.65);
  color: var(--ink, #eef2ff);
  font-weight: 600;
  font-size: 13px;
  min-height: 42px;
  padding: 8px 10px;
  width: 100%;
}
body:not(.authed) .text-designer-select {
  border: 2px solid #334155 !important;
  background: #fff;
  color: #0f172a;
  border-radius: 8px;
}
.text-designer-select:focus { border-color: var(--accent1, #60a5fa) !important; outline: none; box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25); }
.text-designer-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.widgets-gallery-single .text-designer .widget-inline-send-btn { align-self: center; }
.text-designer-foot .widget-inline-hint {
  flex: 1 1 220px !important;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #bfdbfe !important;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12.5px;
}
body:not(.authed) .text-designer-foot .widget-inline-hint {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a !important;
}
.text-designer-foot .widget-inline-hint i { color: var(--accent1, #60a5fa); }
.text-designer-send {
  flex: 0 0 auto;
  font-size: 15px !important;
  padding: 13px 30px !important;
  border-radius: 10px !important;
}
.text-designer-hint {
  display: block !important;
  margin-top: 4px !important;
  padding: 10px 12px !important;
  background: rgba(96, 165, 250, 0.12) !important;
  border: 1px solid rgba(96, 165, 250, 0.4) !important;
  border-radius: 10px !important;
}
.text-designer-hint small { color: #bfdbfe !important; }
@media (max-width: 900px){
  .text-designer-grid { grid-template-columns: 1fr; }
  .text-designer-row2 { grid-template-columns: 1fr; }
  .text-designer-foot .widget-inline-hint { flex: 1 1 100%; }
  .text-designer-send { width: 100%; }
}

/* ===========================================
   TEXT DESIGNER — anti-desbordamiento
   (fieldset no encoge por defecto: min-inline-size;
   rejilla y filas deben envolver dentro de la tarjeta)
   =========================================== */
.widgets-gallery-single { min-width: 0; }
.widget-card.text-designer {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.text-designer-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-width: 0;
}
.text-designer-grid > * { min-width: 0; min-inline-size: 0; max-width: 100%; }
.text-designer-side { min-width: 0; min-inline-size: 0; }
.text-designer-box {
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.text-designer-field, .text-designer-mini { min-width: 0; min-inline-size: 0; }
.text-designer .widget-inline-colors {
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.widgets-gallery-single .text-designer .widget-inline-colors { flex: 1 1 auto; }
.text-designer .widget-inline-color-label {
  flex: 1 1 200px;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.text-designer-row2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}
.text-designer-row2 > * { min-width: 0; min-inline-size: 0; }
.text-designer-select, .text-designer-input {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.text-designer .widget-inline-expire { max-width: 100%; box-sizing: border-box; }
.text-designer-foot { min-width: 0; }
@media (max-width: 1100px){
  .text-designer-grid { grid-template-columns: minmax(0, 1fr); }
}


