/*
 * Styles of the template library pages (/templates/).
 * Pages are generated by code/sql/helperScripts/business/forms/refresh-website-templates/generate-website-templates.py.
 */

.tpl-hero { padding-top: 2.5rem; }
.tpl-breadcrumb { background: transparent; padding: 0; margin-bottom: 1rem; font-size: .9rem; }
.tpl-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--primary, #2568EF); margin-bottom: .25rem; }
.tpl-hero h1 { overflow-wrap: anywhere; }

.tpl-stats { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }
.tpl-stats li { font-size: .95rem; color: #6c757d; }
.tpl-stats strong { display: block; font-size: 1.6rem; line-height: 1.1; color: #212529; }
.tpl-cta .btn { margin: 0 .5rem .5rem 0; }

/* Table of contents / side navigation */
.tpl-toc { position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; font-size: .9rem; padding-right: .5rem; }
.tpl-toc-title { font-weight: 700; margin-bottom: .5rem; }
.tpl-toc ol, .tpl-toc ul { padding-left: 1.1rem; margin: 0; }
.tpl-toc li { margin-bottom: .4rem; }

/* Sections and items */
.tpl-section { padding: 0; margin-bottom: 2.5rem; scroll-margin-top: 6rem; } /* the theme pads every <section> */
.tpl-section h2 { border-bottom: 1px solid #e3e6ea; padding-bottom: .5rem; margin-bottom: 1rem; }
.tpl-num { color: var(--primary, #2568EF); }
.tpl-count { font-size: .8rem; font-weight: 400; color: #6c757d; white-space: nowrap; }
.tpl-items { padding-left: 1.5rem; margin: 0; }
.tpl-items > li { padding: .45rem 0; border-bottom: 1px dashed #eceff2; }
.tpl-items > li:last-child { border-bottom: 0; }
.tpl-q { margin-right: .35rem; }
.tpl-type { display: inline-block; font-size: .72rem; font-weight: 600; line-height: 1.5; padding: 0 .5rem; border-radius: 1rem; background: #eef3fe; color: #1d4fb8; white-space: nowrap; vertical-align: middle; }
.tpl-type-multiple-choice { background: #eaf7ef; color: #1e7a45; }
.tpl-type-number-double, .tpl-type-date, .tpl-type-short-text, .tpl-type-free-text { background: #f1f2f4; color: #4a5059; }
.tpl-pts { font-size: .75rem; color: #6c757d; white-space: nowrap; }
.tpl-options { list-style: none; padding: 0; margin: .35rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.tpl-options li { font-size: .85rem; border: 1px solid #e3e6ea; border-radius: .4rem; padding: .1rem .55rem; }

/* Categories, cards and lists */
.tpl-more h2 { margin-top: 2rem; }
.tpl-pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tpl-pills a { display: inline-block; border: 1px solid var(--primary, #2568EF); border-radius: 2rem; padding: .25rem .9rem; font-size: .9rem; }
.tpl-pills a:hover { background: var(--primary, #2568EF); color: #fff; text-decoration: none; }

.tpl-cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tpl-card a { display: flex; flex-direction: column; height: 100%; border: 1px solid #e3e6ea; border-radius: .5rem; padding: 1rem; color: inherit; transition: border-color .15s, box-shadow .15s; }
.tpl-card a:hover { border-color: var(--primary, #2568EF); box-shadow: 0 .25rem .75rem rgba(37, 104, 239, .12); text-decoration: none; }
.tpl-card-name { font-weight: 700; color: var(--primary, #2568EF); margin-bottom: .25rem; }
.tpl-card-meta { font-size: .85rem; color: #212529; }
.tpl-card-sections { font-size: .8rem; color: #6c757d; margin-top: .35rem; }

.tpl-cats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; margin-bottom: 2.5rem; }
.tpl-cats a { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; border: 1px solid #e3e6ea; border-radius: .5rem; padding: .75rem 1rem; height: 100%; }
.tpl-cats a:hover { border-color: var(--primary, #2568EF); text-decoration: none; }
.tpl-cat-name { font-weight: 600; }
.tpl-cat-count { font-size: .8rem; color: #6c757d; white-space: nowrap; }

.tpl-filter { max-width: 28rem; }
.tpl-az { columns: 3 280px; column-gap: 2rem; padding-left: 1.1rem; }
.tpl-az li { break-inside: avoid; margin-bottom: .35rem; }
.tpl-none { color: #6c757d; }
.tpl-back { margin-top: 2rem; }

@media (max-width: 575px) {
    .tpl-stats strong { font-size: 1.3rem; }
    .tpl-items { padding-left: 1.2rem; }
}
