/* Template details dialog (assets/app/modules/template-detail.js): the slide
   previews scroll as one long image on the left, the panel on the right stays put. */
.bp-td{width:min(1180px,calc(100vw - 48px));height:min(88vh,920px);max-width:none;max-height:none;padding:0;border:0;border-radius:18px;background:#fff;color:#102548;box-shadow:0 30px 90px #041a4673;overflow:hidden}
.bp-td::backdrop{background:#06183acc;backdrop-filter:blur(3px)}
.bp-td[open]{animation:bp-td-in .22s ease-out}
@keyframes bp-td-in{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
html.bp-td-open{overflow:hidden}
.bp-td-shell{display:grid;grid-template-columns:minmax(0,1fr) 380px;height:100%}
.bp-td-gallery{overflow-y:auto;overscroll-behavior:contain;background:#eef2f8;padding:20px;display:flex;flex-direction:column;gap:14px;scrollbar-width:thin;scrollbar-color:#b8c4d6 transparent}
/* No outline: the dialog focuses this column on opening, and a yellow frame showed round it. */
.bp-td-gallery:focus,.bp-td-gallery:focus-visible{outline:none}
.bp-td-gallery img{display:block;width:100%;height:auto!important;border-radius:10px;background:#dfe6f1;box-shadow:0 4px 18px #10254814}
/* The previews (template-detail.js slideGrid), in the column that scrolls: the first large, across the row, the
   others two to a row; each keeps a 16:9 cell, so rows don't jump as images arrive. */
.bp-td-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;flex:none}
.bp-td-grid>:first-child{grid-column:1/-1}
.bp-td-gallery .bp-td-grid img{aspect-ratio:16/9;object-fit:contain}
/* The details below the previews: long images read as one. */
.bp-td-details{margin-top:14px;padding-top:22px;border-top:1px solid #d5dde9}
.bp-td-details-title{margin:0 0 14px!important;font-size:12px!important;font-weight:800;letter-spacing:.12em!important;text-transform:uppercase;color:#4f6382}
.bp-td-details-images{overflow:hidden;border-radius:10px;box-shadow:0 4px 18px #10254814}
.bp-td-details-images img{border-radius:0;box-shadow:none}
.bp-td-placeholder{position:relative;aspect-ratio:16/9;border-radius:10px;background:#ffe329;color:#102548;padding:22px;overflow:hidden}
.bp-td-placeholder>span{font-size:12px;font-weight:800;letter-spacing:.12em}
.bp-td-paper{position:absolute;right:12%;bottom:-8%;width:42%;height:70%;background:#fff;border-radius:8px;transform:rotate(-8deg);padding:18px;display:grid;gap:10px;align-content:start;box-shadow:0 10px 30px #1025481f}
.bp-td-paper i{display:block;height:10px;border-radius:5px;background:#dfe6f1}
.bp-td-paper i:first-child{width:70%;background:#102548}
.bp-td-panel{position:relative;overflow-y:auto;padding:34px 30px 0;border-left:1px solid #e3e8f0;display:flex;flex-direction:column;gap:14px}
/* The download button and its note at the panel's bottom: pushed down under short text, kept in view over long
   text, which scrolls behind it. */
.bp-td-foot{position:sticky;bottom:0;margin-top:auto;padding:12px 0 30px;background:#fff}
/* A round button, the × centered: the theme's button padding (which made it an oval) and its blue hover, focus and
   press (white text) left out. */
.bp-td-close{position:absolute;top:14px;right:14px;z-index:2;display:grid;place-items:center;box-sizing:border-box;width:36px;height:36px;min-width:0;min-height:0;margin:0;padding:0 0 2px;border:0;border-radius:50%;background:#f1f4f9;color:#102548;font-size:22px;font-weight:400;line-height:1;letter-spacing:0;text-transform:none;cursor:pointer;box-shadow:none}
.bp-td-close:focus,.bp-td-close:active{background:#f1f4f9;color:#102548}
.bp-td-close:hover{background:#ffe329;color:#102548}
.bp-td-close:focus-visible{outline:3px solid #0859df;outline-offset:2px}
.bp-td-kicker{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#0859df;padding-right:40px}
.bp-td-panel h2{margin:0!important;font-size:28px!important;line-height:1.15!important;letter-spacing:-.03em!important;color:#102548}
.bp-td-summary{margin:0!important;color:#4f6382;font-size:15px;line-height:1.6}
.bp-td-actions{margin:6px 0 4px}
.bp-td-primary{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-height:50px;border:0;border-radius:10px;background:#ffe329;color:#102548!important;font-size:15px;font-weight:800;letter-spacing:.02em;text-decoration:none;cursor:pointer;transition:transform .15s,box-shadow .15s}
/* Focused or pressed it stays yellow (the theme's button:focus/:active turn buttons blue, under the dark text kept
   above), with an outline for the keyboard. As specific as :hover below, which wins under the pointer; not the
   upgrade link (blue). */
.bp-td-primary:where(button):focus,.bp-td-primary:where(button):active{background:#ffe329}
.bp-td-primary:focus-visible{outline:3px solid #0859df;outline-offset:2px}
/* Under the pointer the site's button blue with white text, as the Download button of a template's page. */
.bp-td-primary:hover{background:var(--global-palette-btn-bg-hover,#0647b5);color:#fff!important;transform:translateY(-2px);box-shadow:0 6px 0 #10254819}
.bp-td-primary[aria-busy="true"]{opacity:.65;pointer-events:none}
.bp-td-upgrade{background:#0859df;color:#fff!important}
/* What "Get it free" leads to, under the button. */
.bp-td-note{margin:10px 0 0;color:#5b6b84;font-size:13px;line-height:1.5;text-align:center}
.bp-td-content{color:#4f6382;font-size:14px;line-height:1.7}
.bp-td-content p{margin:0 0 12px!important}
.bp-td-content :is(ul,ol){margin:0 0 12px;padding-left:20px}
.bp-td-content li{margin:2px 0}
.bp-td-content h3{margin:18px 0 8px!important;font-size:15px!important;line-height:1.35!important;letter-spacing:0!important;color:#102548}
.bp-td-content h3:first-child{margin-top:0!important}
.bp-td-content strong{color:#102548}
.bp-td-content a{color:#0859df;text-decoration:underline;text-underline-offset:2px}
.bp-td-error{margin:40px 0 0!important;color:#b3261e}
.bp-td-skeleton{border-radius:10px;background:linear-gradient(90deg,#e6ebf3 25%,#f3f6fa 50%,#e6ebf3 75%);background-size:200% 100%;animation:bp-td-shine 1.2s linear infinite}
.bp-td-gallery>.bp-td-skeleton{aspect-ratio:16/9;flex:none}
.bp-td-skeleton-line{height:14px;width:55%}
.bp-td-skeleton-title{height:30px;width:85%}
.bp-td-skeleton-button{height:50px;width:100%;margin-top:12px}
@keyframes bp-td-shine{to{background-position:-200% 0}}
/* Cards that open it. */
[data-template-id]:not(button):not(a){cursor:pointer}
[data-template-id]:not(button):not(a):focus-visible{outline:3px solid #ffe329;outline-offset:4px}
/* Dialog off (站点设置): only a card's image and title take clicks. */
.bp-template-links [data-template-id]:not(button):not(a){cursor:auto}
.bp-template-links [data-template-id] :is(.bp-basic-download-preview,.bp-download-art,.bp-search-cover){cursor:pointer}
/* Lists marked data-template-dialog (the free page) open it either way. */
.bp-template-links [data-template-dialog] [data-template-id]:not(button):not(a){cursor:pointer}
/* The title links to the template's own page (followed by crawlers and
   modified clicks; a plain click opens the dialog). */
.bp-site .bp-template-link{color:inherit;text-decoration:none}
.bp-site .bp-template-link[href]:hover{text-decoration:underline;text-underline-offset:3px}
@media(max-width:760px){
 .bp-td{width:100vw;height:100dvh;border-radius:0}
 .bp-td-shell{display:block;height:100%;overflow-y:auto}
 .bp-td-gallery{overflow:visible;padding:14px}
 .bp-td-panel{overflow:visible;border-left:0;padding:24px 18px 96px}
 .bp-td-foot{position:static;margin-top:0;padding:0;background:none}
 .bp-td-actions{position:fixed;left:0;right:0;bottom:0;margin:0;padding:12px 18px calc(12px + env(safe-area-inset-bottom));background:#ffffffee;box-shadow:0 -6px 20px #10254814}
}
@media(prefers-reduced-motion:reduce){.bp-td[open],.bp-td-skeleton{animation:none}}
.bp-td-actions:has(.bp-template-open){display:flex;gap:10px;align-items:stretch}
.bp-td-actions:has(.bp-template-open) .bp-td-primary{flex:1;min-width:0}
.bp-site .bp-td-actions .bp-template-open{width:50px;height:auto;min-height:50px;border-radius:10px;background:#102548;box-shadow:none}
/* Template cards (free page, download centers, plan pages' cases): the
   thumbnail grows a little under the pointer, inside its frame. */
.bp-basic-download-preview,.bp-download-art,.bp-case-card{overflow:hidden}
.bp-site .bp-basic-download-preview img,.bp-site .bp-download-art .bp-download-cover,.bp-site .bp-case-card>img:not(.bp-template-kind){transform:scale(1);transform-origin:center;transition:transform .5s cubic-bezier(.22,.61,.36,1),filter .25s}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){.bp-site .bp-basic-download-card:hover .bp-basic-download-preview img,.bp-site .bp-download-item:hover .bp-download-art .bp-download-cover,.bp-site .bp-case-card:hover>img:not(.bp-template-kind){transform:scale(1.06)}}
