/* Site templates: the picker of ready-made set-ups (site-templates.js). */
.tpl-dialog{width:1040px}
.tpl-body{display:flex;flex-direction:column;gap:16px;padding:16px 26px 18px}
.tpl-where{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tpl-where button{display:flex;flex-direction:column;gap:2px;align-items:flex-start;text-align:left;font:inherit;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);cursor:pointer}
.tpl-where button b{font-size:var(--text-ui);font-weight:700}
.tpl-where button small{font-size:var(--text-xs);color:var(--dim);line-height:1.4}
.tpl-where button.on{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:#f2f6ff}
.tpl-where button:disabled{cursor:not-allowed;opacity:.6}
.tpl-where button:not(:disabled):not(.on):hover{background:#f3f5f8}
.tpl-list{display:flex;flex-direction:column;gap:20px}
.tpl-group h3{margin:0 0 8px;font-size:var(--text-sm);font-weight:700;color:var(--ink)}
.tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(228px,1fr));gap:12px}
.tpl-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;font:inherit;padding:0;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);cursor:pointer;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.tpl-card:hover{border-color:var(--line2);box-shadow:0 6px 18px rgba(18,43,62,.10)}
.tpl-card.pick{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.tpl-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tpl-pic{display:block;aspect-ratio:8/5;background:#e9eef2 linear-gradient(135deg,#eef2f5,#dde4ea)}
.tpl-pic img{display:block;width:100%;height:100%;object-fit:cover}
.tpl-pic.none img{display:none}
.tpl-text{display:flex;flex-direction:column;gap:4px;padding:10px 12px 12px}
.tpl-text b{font-size:var(--text-ui);font-weight:700;line-height:1.3}
.tpl-text small{font-size:var(--text-xs);color:var(--dim);line-height:1.45}
.tpl-facts{font-size:var(--text-2xs);font-weight:600;color:var(--accentText);margin-top:2px}
.tpl-foot{margin:0;font-size:var(--text-xs);color:var(--dim);line-height:1.5}
@media(max-width:700px){.tpl-body{padding:12px 16px 14px;gap:12px}.tpl-where{grid-template-columns:1fr}.tpl-grid{grid-template-columns:1fr 1fr;gap:10px}.tpl-text small{display:none}.ev-backdrop:has(.tpl-dialog){padding:0}.tpl-dialog{max-height:100dvh;border-radius:0}}
@media(max-width:520px){.tpl-grid{grid-template-columns:1fr;gap:8px}.tpl-card{flex-direction:row}.tpl-pic{flex:0 0 42%;aspect-ratio:auto;min-height:96px}.tpl-text{padding:9px 11px 10px}.tpl-foot{display:none}}
/* the picker's options: Add as (on this plan only) and setting up the job */
.tpl-opts{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
.tpl-as{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap}
.tpl-as-label{font-size:var(--text-xs);font-weight:700;color:var(--dim);margin-right:2px}
.tpl-as button{font:inherit;font-size:var(--text-xs);font-weight:600;padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);cursor:pointer}
.tpl-as button.on{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:#f2f6ff;color:var(--accentText)}
.tpl-as button:not(.on):hover{background:#f3f5f8}
.tpl-job{display:inline-flex;align-items:flex-start;gap:8px;font-size:var(--text-xs);color:var(--ink);line-height:1.45;cursor:pointer}
.tpl-job input{margin:2px 0 0;accent-color:var(--accent);flex:none}
/* the group panel: turn, mirror and change chargers (planner side panel) */
.grp-shape{margin-top:8px}
.grp-swap{margin-top:10px;display:flex;flex-direction:column;gap:4px}
.grp-swap label{font-size:var(--text-xs);font-weight:650;color:var(--dim)}
.grp-swap-row{display:flex;gap:6px;align-items:stretch}
.grp-swap-row select{flex:1;min-width:0}
.grp-swap-row .pbtn{flex:none}
