/* SlideCV template library clarity pass */
.template-library-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 14px;
  padding: 11px 12px;
  border: 1px solid #dce6f5;
  border-radius: 15px;
  background: linear-gradient(135deg, #f8fbff, #f4f1ff);
  color: #53627a;
  font-size: 11px;
  font-weight: 800;
}
.template-library-summary strong { color: #315fd9; }
.template-library-summary span:last-child { color: #7a879b; font-size: 10px; }

.template-library-filters {
  display: flex;
  gap: 7px;
  margin: 0 0 14px;
  padding: 2px 0 7px;
  overflow-x: auto;
  scrollbar-width: none;
}
.template-library-filters::-webkit-scrollbar { display: none; }
.template-library-filters button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #dce5f2;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #63718a;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.template-library-filters button:hover,
.template-library-filters button.is-active {
  transform: translateY(-1px);
  border-color: #9db6fa;
  background: #edf3ff;
  color: #315fd9;
  box-shadow: 0 8px 18px rgba(76,120,241,.11);
}

.template-list {
  gap: 14px !important;
  padding-bottom: 28px;
}
.template-card {
  min-height: 178px;
  grid-template-columns: 112px minmax(0, 1fr) !important;
  gap: 15px !important;
  padding: 14px !important;
  border-radius: 22px !important;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.template-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(118deg, transparent 18%, rgba(255,255,255,.75) 48%, transparent 72%);
  transform: translateX(-110%);
}
.template-card:hover,
.template-card:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--template-accent, #4c78f1) 45%, #d9e2f0);
  box-shadow: 0 19px 40px rgba(39,58,101,.13);
  outline: none;
}
.template-card:hover::before { animation: slidecv-template-shine .7s ease; }
.template-card.active {
  border-color: var(--template-accent, #315fd9) !important;
  background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--template-accent, #315fd9) 5%, white));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--template-accent, #315fd9) 12%, transparent), 0 18px 38px rgba(39,58,101,.12) !important;
}
.template-card[hidden] { display: none !important; }

.template-thumb {
  width: 112px !important;
  height: 150px !important;
  padding: 11px !important;
  gap: 7px !important;
  border-radius: 13px !important;
  box-shadow: inset 0 0 0 4px #f8fafc, 0 10px 22px rgba(39,58,101,.08) !important;
  transition: transform .22s ease, box-shadow .22s ease;
}
.template-card:hover .template-thumb { transform: translateY(-2px) scale(1.015); box-shadow: inset 0 0 0 4px #f8fafc, 0 15px 28px rgba(39,58,101,.12) !important; }
.template-thumb i { height: 20px !important; }
.template-thumb b { height: 5px !important; }
.template-thumb em { height: 38px !important; }
.template-thumb .thumb-photo-dot { width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--thumb-accent) 24%, #fff); border: 2px solid var(--thumb-accent); }

/* Make the eight layout families visually distinct in the picker. */
.thumb-clean { border-top: 5px solid var(--thumb-accent) !important; }
.thumb-clean i { width: 72%; }
.thumb-sidebar { grid-template-columns: 28px 1fr !important; background: linear-gradient(90deg, color-mix(in srgb, var(--thumb-accent) 16%, #fff) 0 34%, #fff 34%) !important; }
.thumb-sidebar i { height: 122px !important; border-radius: 6px !important; }
.thumb-minimal { border: 1px solid #cfd8e6 !important; box-shadow: inset 0 4px 0 #111827, 0 10px 22px rgba(39,58,101,.08) !important; }
.thumb-minimal i, .thumb-minimal b, .thumb-minimal em { width: 72%; justify-self: center; }
.thumb-executive { border-top: 8px double var(--thumb-accent) !important; background: linear-gradient(180deg, #fff 0 24%, #faf8f5 24%) !important; }
.thumb-executive i { height: 14px !important; width: 82%; }
.thumb-headerBlock { padding-top: 9px !important; background: linear-gradient(180deg, var(--thumb-accent) 0 30%, #fff 30%) !important; }
.thumb-headerBlock i { height: 31px !important; background: rgba(255,255,255,.86) !important; }
.thumb-headerBlock b:first-of-type { margin-top: 10px; }
.thumb-centered { text-align: center; border-top: 3px solid var(--thumb-accent) !important; }
.thumb-centered i, .thumb-centered b, .thumb-centered em { width: 72%; justify-self: center; }
.thumb-split { grid-template-columns: 36px 1fr !important; background: linear-gradient(90deg, #f5f7fb 0 38%, #fff 38%) !important; border-left: 5px solid var(--thumb-accent) !important; }
.thumb-split i { height: 122px !important; opacity: .82; }
.thumb-lineArt { border-left: 7px solid var(--thumb-accent) !important; background: repeating-linear-gradient(180deg, #fff 0 25px, #f8fafc 25px 26px) !important; }
.thumb-lineArt i { height: 12px !important; }
.thumb-lineArt em { border-left: 0 !important; border-top: 3px solid var(--thumb-accent); }

.template-meta { min-width: 0; align-self: center; }
.template-meta strong { padding-right: 24px; font-size: 17px !important; }
.template-meta > div > span { margin-top: 3px !important; line-height: 1.35; }
.template-meta p {
  display: -webkit-box;
  margin-top: 9px !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.template-family-pill {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 8px !important;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--template-accent, #4c78f1) 24%, #dfe6f1);
  border-radius: 999px;
  background: color-mix(in srgb, var(--template-accent, #4c78f1) 8%, #fff);
  color: color-mix(in srgb, var(--template-accent, #4c78f1) 76%, #263650) !important;
  font-size: 9px !important;
  font-weight: 900;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.template-meta small { margin-top: 7px !important; }

.template-quick-preview {
  position: fixed;
  left: 486px;
  top: 92px;
  z-index: 70;
  width: 232px;
  padding: 16px;
  border: 1px solid #dce5f2;
  border-radius: 24px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 28px 70px rgba(28,42,78,.24);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px) scale(.96);
  transition: opacity .18s ease, transform .18s ease;
}
.template-quick-preview.is-visible { opacity: 1; transform: translateX(0) scale(1); }
.template-quick-preview .template-thumb {
  width: 200px !important;
  height: 270px !important;
  margin-bottom: 13px;
  transform: none !important;
}
.template-quick-preview .template-thumb i { height: 34px !important; }
.template-quick-preview .template-thumb b { height: 8px !important; }
.template-quick-preview .template-thumb em { height: 65px !important; }
.template-quick-preview .thumb-sidebar i,
.template-quick-preview .thumb-split i { height: 228px !important; }
.template-quick-preview h3 { margin: 0; color: #263650; font-size: 17px; letter-spacing: -.035em; }
.template-quick-preview p { margin: 5px 0 0; color: #718098; font-size: 11px; line-height: 1.5; }
.template-quick-preview span { display: inline-flex; margin-top: 10px; color: #315fd9; font-size: 10px; font-weight: 900; }

.zoom-tools { flex-wrap: wrap; border-radius: 16px !important; }
.zoom-tools .template-fit-control {
  width: auto !important;
  min-width: 74px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d9e3f1 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #40516d !important;
  font-size: 10px !important;
  font-weight: 900;
}
.zoom-tools .template-fit-control:hover { border-color: #9cb4f8 !important; color: #315fd9 !important; }

@keyframes slidecv-template-shine { to { transform: translateX(110%); } }

@media (max-width: 1320px) {
  .template-quick-preview { left: 452px; }
}
@media (max-width: 1120px) {
  .template-quick-preview { display: none; }
}
@media (max-width: 900px) {
  .template-library-summary { align-items: flex-start; flex-direction: column; }
  .template-card { grid-template-columns: 96px minmax(0,1fr) !important; }
  .template-thumb { width: 96px !important; height: 132px !important; }
  .zoom-tools .template-fit-control { min-width: 66px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .template-card,
  .template-card::before,
  .template-thumb,
  .template-library-filters button,
  .template-quick-preview { animation: none !important; transition: none !important; }
}
