/* Generador de firma de correo (prefijo fm-) — usa mm-tools.css */
.fm-head { margin-bottom: 14px; }

/* Plantillas */
.fm-tpls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.fm-tpl { flex-direction: column; gap: 8px; padding: 10px 10px 12px; }
.fm-tpl .txt b { font-size: 13.5px; }
.fm-tpl .txt small { font-size: 12px; }
.fm-thumb { display: block; width: 100%; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.fm-thumb svg { display: block; width: 100%; height: auto; }
.fm-thumb .a { fill: var(--fm-c, #c026d3); } .fm-thumb .d { fill: #3a3340; } .fm-thumb .m { fill: #d9d3de; } .fm-thumb .w { fill: #fff; } .fm-thumb .o { fill: #fff; stroke: #e2dce6; }
@media (max-width: 1240px) and (min-width: 1041px), (max-width: 640px) { .fm-tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Secciones plegables */
.fm-sec { border-top: 1px solid var(--line); }
.fm-sec:last-of-type { border-bottom: 1px solid var(--line); }
.fm-sec summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 56px; cursor: pointer; padding: 4px 0; }
.fm-sec summary::-webkit-details-marker { display: none; }
.fm-sec summary .tl-mono { font-size: 11.5px; color: var(--tl-acc); letter-spacing: .06em; }
.fm-sec summary b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.fm-sec summary small { margin-left: auto; font-size: 12px; color: var(--paper-faint); font-family: 'JetBrains Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.fm-sec summary::after { content: ""; flex-shrink: 0; width: 8px; height: 8px; margin: 0 4px 0 0; border-right: 1.5px solid var(--paper-dim); border-bottom: 1.5px solid var(--paper-dim); transform: rotate(45deg) translateY(-3px); transition: transform .25s; }
.fm-sec:not(:has(> summary small)) summary::after { margin-left: auto; }
.fm-sec[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.fm-sec summary:focus-visible { outline: 2px solid #f036e1; outline-offset: 2px; border-radius: 8px; }
.fm-sec-b { display: grid; gap: 14px; padding: 4px 0 22px; animation: tlIn .35s cubic-bezier(.16,1,.3,1) both; }
.fm-note { margin: -4px 0 0; }
.fm .pg-field > label small { text-align: right; }

/* Color */
.fm-sws { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fm-sw { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 0; padding: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); transition: transform .2s cubic-bezier(.16,1,.3,1); }
.fm-sw:hover { transform: scale(1.06); }
.fm-sw.on { outline: 2px solid var(--paper); outline-offset: 2px; }
.fm-sw.custom { background: conic-gradient(#f036e1, #9149ff, #3b82f6, #25d366, #f5b84b, #f036e1); overflow: hidden; }
.fm-sw.custom.on { background: var(--c); }
.fm-sw.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.fm-sw.custom:has(input:focus-visible) { outline: 2px solid #f036e1; outline-offset: 2px; }
.fm-sec .tl-field-row:has(#fm-shape) { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 640px) { .fm-sec .tl-field-row:has(#fm-shape) { grid-template-columns: 1fr; } }

/* Vista previa */
.fm-mail { border-radius: 18px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line-strong), 0 24px 48px -30px rgba(0,0,0,.55); }
.fm-mail-top { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #2b2430; color: #f4eef6; font-size: 12.5px; }
.fm-mail-top span { margin-right: auto; font-weight: 500; }
.fm-mail-top i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.28); }
.fm-mail-row { display: flex; gap: 12px; padding: 9px 18px; border-bottom: 1px solid #eee9f1; font-size: 13px; color: #1f1a24; }
.fm-mail-row span { color: #8a8390; width: 52px; flex-shrink: 0; }
.fm-mail-row b { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-frame { display: block; width: 100%; height: 260px; border: 0; background: #fff; transition: height .2s; }
.fm-code { max-height: 460px; font-size: 12px; }
.fm-warn { margin-top: 16px; }
.fm-warn > svg { color: var(--tl-warn); }
.fm-actions { margin: 18px 0 12px; }
.fm-actions .btn[disabled], .fm-actions .tl-btn[disabled] { opacity: .45; pointer-events: none; }
@media (max-width: 480px) { .fm-actions .btn, .fm-actions .tl-btn { width: 100%; justify-content: center; } }

/* Guía por cliente */
.fm-guide { grid-column: 1 / -1; }
.fm-guide-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 40px; align-items: end; margin-bottom: 24px; }
.fm-guide-head .tl-sub { margin: 0; }
.fm-guide-head .tl-sub b { color: var(--paper); }
.fm-guide-title { font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
@media (max-width: 900px) { .fm-guide-head { grid-template-columns: 1fr; } }
.fm-clients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.fm-clients article { padding: 22px 24px 4px 0; min-width: 0; }
.fm-clients article + article { padding-left: 24px; border-left: 1px solid var(--line); }
.fm-clients h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 17px; font-weight: 600; }
.fm-clients h3 svg { color: var(--tl-acc); }
.fm-clients ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; color: var(--paper-dim); line-height: 1.6; }
.fm-clients ol b { color: var(--paper); font-weight: 600; }
@media (max-width: 900px) {
  .fm-clients { grid-template-columns: 1fr; }
  .fm-clients article, .fm-clients article + article { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .fm-clients article:last-child { border-bottom: 0; }
}

/* Acceso rápido a la vista previa (≤ 1040 px) */
.fm-jump { position: fixed; left: 50%; bottom: 20px; z-index: 60; display: none; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 500; color: #fff; cursor: pointer;
  background: linear-gradient(110deg, #f036e1, #9149ff); box-shadow: 0 16px 34px -12px rgba(145,73,255,.6); transform: translate(-50%, 140%); transition: transform .4s cubic-bezier(.16,1,.3,1); }
.fm-jump.show { transform: translate(-50%, 0); }
@media (max-width: 1040px) { .fm-jump { display: inline-flex; } }
@media (prefers-reduced-motion: reduce) { .fm-jump { transition: none; } }
@media print { .fm-jump { display: none !important; } }
