/* Templates of the Images section. */
.image-tabs { display:inline-flex; gap:2px; margin:0 0 20px; padding:3px; border-radius:10px; background:var(--soft,var(--panel2)); }
.image-tabs button { height:32px; padding:0 14px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:13.5px; font-weight:550; cursor:pointer; }
.image-tabs button[aria-selected=true] { background:var(--panel); color:var(--text); box-shadow:0 1px 2px rgb(0 0 0 / .12); }
.image-templates[hidden], #imageLibraryPane[hidden] { display:none; }
.template-categories { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
.template-category { height:30px; padding:0 12px; border:1px solid var(--line); border-radius:999px; background:transparent; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; transition:color .15s,border-color .15s; }
.template-category:hover { color:var(--text); }
.template-category[aria-pressed=true] { border-color:var(--text); color:var(--text); }
.template-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:16px 12px; }
.template-card { display:grid; gap:8px; min-width:0; padding:0; border:0; background:none; color:var(--text); font:inherit; font-size:13.5px; text-align:left; cursor:pointer; }
.template-card img { display:block; width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; background:var(--panel2); transition:opacity .15s; }
.template-card:hover img { opacity:.86; }
.template-card:focus-visible img { outline:2px solid var(--text); outline-offset:2px; }
.template-card span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.template-back { display:inline-flex; align-items:center; gap:6px; height:32px; margin-bottom:12px; padding:0 10px 0 6px; border:0; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:13.5px; cursor:pointer; }
.template-back:hover { color:var(--text); }
.template-back svg { width:16px; height:16px; }
.template-detail { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
.template-detail > img { display:block; width:100%; aspect-ratio:1; object-fit:cover; border-radius:12px; background:var(--panel2); }
.template-form { display:grid; gap:10px; }
.template-form small { color:var(--muted); font-size:12.5px; }
.template-form h3 { margin:0 0 8px; color:var(--text); font-size:20px; font-weight:600; }
.template-form label { color:var(--text); font-size:13.5px; font-weight:550; }
.template-form input { width:100%; min-height:42px; padding:8px 12px; border:1px solid var(--line2,var(--line)); border-radius:10px; background:var(--panel2); color:var(--text); font:inherit; font-size:15px; outline:0; }
.template-form input:focus { border-color:var(--text); }
.template-form p { margin:0; color:var(--muted); font-size:12.5px; line-height:1.5; }
.template-form .btn { justify-self:start; margin-top:6px; }
@media(max-width:640px){
  .template-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 10px; }
  .template-detail { grid-template-columns:1fr; gap:16px; }
  .template-form .btn { justify-self:stretch; justify-content:center; }
}
