/*
Theme Name: Thistle Maker Gallery
Theme URI: https://popandthistle.com/
Author: Pop & Thistle
Author URI: https://popandthistle.com/
Description: A blue and lavender photo gallery for art, crafts, handmade projects, and everyday makers. Designed to pair with Thistle Maker Submissions.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thistle-maker-gallery
Tags: grid-layout, custom-logo, custom-menu, featured-images, blog, portfolio, photography, translation-ready, wide-blocks
*/
:root {
 --tmg-ink:#30364f; --tmg-muted:#626c86; --tmg-paper:#eaf0fb; --tmg-card:#fff;
 --tmg-cream:#e5e0f3; --tmg-accent:#4964a3; --tmg-clay:#7061a0; --tmg-line:#ccd5ed;
 --tmg-radius:5px; --tmg-width:1320px;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--tmg-paper); color:var(--tmg-ink); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.65; }
a { color:var(--tmg-accent); text-underline-offset:3px; }
a:hover { text-decoration-thickness:2px; }
img { max-width:100%; height:auto; vertical-align:middle; }
button,input,select,textarea { font:inherit; }
button,.tmg-button { cursor:pointer; }
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid var(--tmg-accent); outline-offset:4px; }
h1,h2,h3 { font-family:Georgia,"Times New Roman",serif; font-weight:400; line-height:1.15; }
h1 { font-size:clamp(2.2rem,4vw,4.25rem); }
.screen-reader-text { clip:rect(1px,1px,1px,1px); clip-path:inset(50%); height:1px; width:1px; overflow:hidden; position:absolute!important; white-space:nowrap; }
.screen-reader-text:focus { clip:auto; clip-path:none; width:auto; height:auto; padding:1rem; top:0; left:0; background:#fff; z-index:99999; }
.tmg-wrap { width:min(var(--tmg-width),calc(100% - 64px)); margin-inline:auto; }
.tmg-header { background:#f1effa; border-bottom:1px solid var(--tmg-line); color:var(--tmg-ink); }
.tmg-header-inner { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:28px; min-height:80px; padding-block:9px; }
.tmg-brand { grid-column:2; grid-row:1; min-width:0; text-align:center; }
.tmg-brand>a { color:var(--tmg-ink); text-decoration:none; }
.tmg-wordmark { display:inline-flex; align-items:center; gap:11px; }
.tmg-maker-mark { color:var(--tmg-clay); width:39px; height:39px; flex-shrink:0; }
.tmg-wordmark-letters { display:flex; flex-direction:column; align-items:center; gap:4px; }
.tmg-wordmark-main { font:italic 1.85rem/1.03 Georgia,"Times New Roman",serif; letter-spacing:-1.1px; }
.tmg-wordmark-sub { font-size:.53rem; line-height:1.2; letter-spacing:3.6px; text-transform:uppercase; padding-left:4px; font-weight:700; }
.tmg-wordmark-site-name { max-width:300px; font-size:1.7rem; line-height:1.12; overflow-wrap:anywhere; }
.custom-logo-link { display:inline-block; }
.custom-logo-link img { max-width:230px; max-height:52px; width:auto; }
.tmg-nav { grid-column:1; grid-row:1; min-width:0; }
.tmg-menu { display:flex; align-items:center; gap:25px; list-style:none; padding:0; margin:0; flex-wrap:wrap; }
.tmg-menu a { color:var(--tmg-ink); text-decoration:none; font-size:.82rem; }
.tmg-menu a:hover { color:var(--tmg-clay); }
.tmg-menu .sub-menu { list-style:none; padding-left:15px; }
.tmg-menu li { position:relative; }
.tmg-menu>li>.sub-menu { display:none; position:absolute; top:100%; left:0; z-index:10; background:var(--tmg-paper); border:1px solid var(--tmg-line); padding:17px; width:210px; box-shadow:0 9px 20px #30364f0d; }
.tmg-menu li:hover>.sub-menu,.tmg-menu li:focus-within>.sub-menu { display:block; }
.tmg-nav-toggle { display:none; background:transparent; border:1px solid #b9c3df; border-radius:4px; color:var(--tmg-ink); padding:7px 12px; }
.tmg-header-actions { grid-column:3; grid-row:1; display:flex; align-items:center; justify-content:flex-end; gap:23px; min-width:0; }
.tmg-header-search { display:flex; max-width:156px; min-width:0; align-items:center; gap:7px; }
.tmg-header-search input { width:100%; min-width:0; padding:8px 0; border:0; border-bottom:1px solid #c2cbe3; background:transparent; color:var(--tmg-ink); font-size:.78rem; }
.tmg-header-search input::placeholder { color:#6c728e; opacity:1; }
.tmg-header-search button { display:flex; align-items:center; background:none; border:0; color:var(--tmg-ink); padding:5px 0 5px 4px; }
.tmg-button { display:inline-flex; justify-content:center; align-items:center; gap:8px; padding:11px 21px; border:1px solid var(--tmg-accent); background:var(--tmg-accent); color:#fff; text-decoration:none; font-size:.8rem; font-weight:600; line-height:1.5; border-radius:var(--tmg-radius); }
.tmg-header .tmg-share-button { background:var(--tmg-clay); color:#fff; border-color:var(--tmg-clay); white-space:nowrap; font-size:.76rem; padding:10px 17px; }
.tmg-button:hover { filter:brightness(.95); text-decoration:none; }
.tmg-hero { background:linear-gradient(120deg,#dce8fb 0%,#e4e8f9 48%,#eae0f5 100%); margin-bottom:35px; border-bottom:1px solid var(--tmg-line); }
.tmg-hero-copy { display:flex; align-items:center; flex-direction:column; text-align:center; padding-block:32px 29px; }
.tmg-eyebrow { display:inline-block; text-transform:uppercase; font-size:.62rem; letter-spacing:2.3px; font-weight:700; color:var(--tmg-accent); }
.tmg-hero .tmg-eyebrow { display:flex; align-items:center; gap:15px; color:var(--tmg-clay); }
.tmg-hero .tmg-eyebrow:before,.tmg-hero .tmg-eyebrow:after { content:""; width:30px; height:1px; background:#8a99c780; }
.tmg-hero h1 { margin:13px 0 14px; max-width:720px; font-size:clamp(2.5rem,4.4vw,3.8rem); letter-spacing:-2px; line-height:1.06; text-wrap:balance; }
.tmg-hero p { margin:0; max-width:590px; color:#596680; font-size:.95rem; line-height:1.8; }
.tmg-hero-cats { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin-top:23px; max-width:1050px; }
.tmg-hero-cats a { display:inline-flex; align-items:center; justify-content:center; border:1px solid #c6d0e8; padding:8px 18px; border-radius:30px; background:#fff9; color:var(--tmg-accent); font-size:.74rem; font-weight:500; text-decoration:none; transition:background .2s,color .2s; }
.tmg-hero-cats a:hover,.tmg-hero-cats .tmg-category-all { background:var(--tmg-accent); color:#fff; border-color:var(--tmg-accent); }
#tmg-gallery { scroll-margin-top:20px; }
.tmg-toolbar { display:flex; align-items:center; gap:16px; justify-content:space-between; margin:0 0 25px; padding-bottom:20px; }
.tmg-toolbar .tmg-eyebrow { font-size:.55rem; letter-spacing:1.9px; margin-bottom:5px; }
.tmg-toolbar h2 { font-size:1.9rem; margin:0; letter-spacing:-.5px; }
.tmg-filter { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tmg-filter select,.tmg-filter input { border:1px solid var(--tmg-line); padding:9px 11px; background:#fff; color:var(--tmg-ink); font-size:.76rem; max-width:210px; border-radius:var(--tmg-radius); }
.tmg-filter button { font-size:.74rem; padding:9px 14px; }
.tmg-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:28px 24px; padding-bottom:43px; }
.tmg-card { background:var(--tmg-card); min-width:0; border:1px solid #d0daf0; border-radius:var(--tmg-radius); overflow:hidden; display:flex; flex-direction:column; }
.tmg-card-image { aspect-ratio:1; display:block; overflow:hidden; background:#dfe6f5; position:relative; }
.tmg-card-image img { width:100%; height:100%; object-fit:cover; transition:transform .35s; }
.tmg-card-image:hover img { transform:scale(1.035); }
.tmg-card-placeholder { height:100%; display:grid; place-items:center; color:#6479a8; font:2.8rem Georgia,serif; background:radial-gradient(circle at 25% 20%,#eff2fc,transparent 70%),#dce3f4; }
.tmg-card-body { padding:17px 18px 12px; flex:1; }
.tmg-card-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--tmg-muted); font-size:.64rem; margin-bottom:9px; }
.tmg-card-meta a { text-decoration:none; color:var(--tmg-accent); font-weight:600; }
.tmg-card-meta span { overflow-wrap:anywhere; }
.tmg-card h2 { font-size:1.3rem; line-height:1.25; margin:0 0 10px; }
.tmg-card h2 a { color:var(--tmg-ink); text-decoration:none; }
.tmg-card h2 a:hover { color:var(--tmg-accent); }
.tmg-card p { font-size:.79rem; line-height:1.65; color:var(--tmg-muted); margin:0 0 4px; }
.tmg-card-footer { padding:0 18px 17px; display:flex; align-items:center; justify-content:space-between; font-size:.65rem; gap:12px; color:var(--tmg-muted); }
.tmg-card-footer a { color:var(--tmg-accent); font-weight:600; text-decoration:none; }
.tmg-pagination .nav-links { display:flex; justify-content:center; gap:7px; padding:0 0 45px; }
.tmg-pagination .page-numbers { display:inline-grid; place-items:center; min-width:38px; height:38px; padding:0 10px; text-decoration:none; border:1px solid var(--tmg-line); background:#fff; }
.tmg-pagination .current { background:var(--tmg-accent); color:#fff; }
.tmg-footer { border-top:1px solid var(--tmg-line); padding:27px 0; background:var(--tmg-cream); margin-top:20px; }
.tmg-footer-inner { display:flex; justify-content:space-between; gap:20px; font-size:.73rem; color:#596582; }
.tmg-footer-menu { display:flex; gap:20px; list-style:none; margin:0; padding:0; }
.tmg-footer-menu a { color:inherit; }
.tmg-page,.tmg-single { width:min(840px,calc(100% - 48px)); margin:50px auto 70px; background:#fff; padding:46px; border:1px solid var(--tmg-line); border-radius:var(--tmg-radius); }
.tmg-page h1,.tmg-single h1 { font-size:clamp(2rem,4vw,3.25rem); margin:10px 0 25px; }
.tmg-single-meta { color:var(--tmg-muted); font-size:.8rem; margin-bottom:25px; }
.tmg-content { overflow-wrap:anywhere; }
.tmg-content h2 { font-size:1.7rem; margin-top:1.4em; }
.tmg-content h3 { font-size:1.4rem; }
.tmg-content .alignwide { margin-inline:-24px; max-width:calc(100% + 48px); }
.tmg-content figure { margin-inline:0; }
.tmg-content iframe { max-width:100%; }
.tmg-content table { width:100%; border-collapse:collapse; }
.tmg-content td,.tmg-content th { padding:9px; border:1px solid var(--tmg-line); }
.tmg-content blockquote { border-left:3px solid var(--tmg-accent); padding-left:22px; margin-inline:0; color:var(--tmg-muted); }
.tmg-post-thumbnail { margin:0 0 30px; }
.tmg-post-thumbnail img { width:100%; }
.tmg-empty { padding:42px 0 70px; max-width:680px; }
.tmg-empty h2 { font-size:2rem; }
.tmg-archive-heading { padding:40px 0 25px; }
.tmg-archive-heading h1 { margin:0 0 12px; font-size:2.7rem; }
.tmg-archive-heading p { color:var(--tmg-muted); max-width:700px; }
.tmg-comments { border-top:1px solid var(--tmg-line); margin-top:35px; padding-top:20px; }
.tmg-comments input:not([type=checkbox]),.tmg-comments textarea { max-width:100%; border:1px solid var(--tmg-line); padding:10px; }
.tmg-comments label { display:block; }
.tmg-comments .comment-list { padding-left:22px; }
.tmg-comments .submit { background:var(--tmg-accent); color:white; border:0; padding:12px 22px; }
.wp-caption-text,.gallery-caption { font-size:.8rem; color:var(--tmg-muted); }
.sticky { border-color:#9caed5; }
.bypostauthor { border-left:2px solid var(--tmg-accent); padding-left:12px; }
.alignleft { float:left; margin-right:20px; }
.alignright { float:right; margin-left:20px; }
.aligncenter { display:block; margin-inline:auto; }
@media(max-width:1100px) {
 .tmg-header-inner { gap:18px; }
 .tmg-header-search { max-width:120px; }
 .tmg-header-actions { gap:15px; }
 .tmg-menu { gap:15px; }
 .tmg-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .tmg-wordmark-main { font-size:1.8rem; }
 .tmg-maker-mark { width:37px; height:37px; }
}
@media(max-width:900px) and (min-width:761px) {
 .tmg-header-search { display:none; }
 .tmg-menu { gap:12px; }
 .tmg-menu a { font-size:.75rem; }
}
@media(max-width:760px) {
 .tmg-wrap { width:calc(100% - 32px); }
 .tmg-header-inner { grid-template-columns:minmax(0,1fr) auto; gap:10px 16px; padding-block:11px; min-height:0; }
 .tmg-brand { grid-column:1; grid-row:1; text-align:left; justify-self:start; }
 .tmg-wordmark-main { font-size:1.7rem; }
 .tmg-wordmark-sub { font-size:.55rem; letter-spacing:3.5px; }
 .tmg-maker-mark { width:35px; height:35px; }
 .tmg-wordmark-site-name { font-size:1.55rem; max-width:240px; }
 .tmg-nav-toggle { display:inline-block; grid-column:2; grid-row:1; justify-self:end; }
 .tmg-nav { display:none; grid-column:1/-1; grid-row:auto; width:100%; border-top:1px solid var(--tmg-line); }
 .tmg-nav.is-open { display:block; }
 .tmg-menu { align-items:flex-start; flex-direction:column; gap:12px; padding:14px 0 0; }
 .tmg-menu>li>.sub-menu { display:block; position:static; width:auto; padding:8px 0 0 15px; border:0; box-shadow:none; }
 .tmg-header-actions { grid-column:1/-1; grid-row:auto; justify-content:space-between; gap:18px; }
 .tmg-header-search { display:flex; max-width:230px; flex:1; }
 .tmg-header .tmg-share-button { padding:9px 15px; font-size:.74rem; }
 .tmg-hero { margin-bottom:27px; }
 .tmg-hero-copy { padding-block:27px 25px; }
 .tmg-hero .tmg-eyebrow { font-size:.55rem; letter-spacing:1.5px; gap:10px; }
 .tmg-hero .tmg-eyebrow:before,.tmg-hero .tmg-eyebrow:after { width:17px; }
 .tmg-hero h1 { font-size:clamp(2.3rem,8.3vw,3.25rem); letter-spacing:-1.3px; max-width:600px; margin:16px 0; }
 .tmg-hero p { font-size:.86rem; max-width:490px; }
 .tmg-hero-cats { gap:8px; margin-top:22px; }
 .tmg-hero-cats a { font-size:.68rem; padding:7px 13px; }
 .tmg-toolbar { align-items:flex-start; flex-direction:column; gap:16px; padding-bottom:7px; margin-bottom:23px; }
 .tmg-toolbar h2 { font-size:1.7rem; }
 .tmg-filter { width:100%; }
 .tmg-filter select { max-width:180px; flex:1; min-width:0; }
 .tmg-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 14px; }
 .tmg-card-body { padding:13px 13px 8px; }
 .tmg-card h2 { font-size:1.12rem; }
 .tmg-card-footer { padding:0 13px 13px; }
 .tmg-card-meta { font-size:.58rem; align-items:flex-start; }
 .tmg-card-meta span { max-width:63%; }
 .tmg-footer-inner { flex-direction:column; gap:9px; }
 .tmg-page,.tmg-single { width:calc(100% - 28px); padding:25px 20px; margin:30px auto 45px; }
 .tmg-content .alignwide { margin-inline:0; max-width:100%; }
}
@media(max-width:380px) {
 .tmg-grid { grid-template-columns:1fr; }
 .tmg-wordmark-main { font-size:1.65rem; }
 .tmg-maker-mark { width:35px; height:35px; }
 .tmg-wordmark-site-name { font-size:1.3rem; }
 .tmg-nav-toggle { font-size:.75rem; }
 .tmg-hero h1 { font-size:2.35rem; }
}
@media(prefers-reduced-motion:reduce) {
 html { scroll-behavior:auto; }
 *,*:before,*:after { transition:none!important; }
}

/* Guest Gallery uses the active theme's blue and lavender palette. */
body .tms-form-wrap,body .tms-gallery {
 --tms-ink:var(--tmg-ink); --tms-muted:var(--tmg-muted);
 --tms-accent:var(--tmg-accent); --tms-line:var(--tmg-line);
}
body .tms-upload { background:#f0f2fc; border-color:#aabbdc; }
body .tms-upload-icon { color:var(--tmg-accent); }
body .tms-upload input::file-selector-button { border-color:#b8c5e3; }
body .tms-notice:not(.tms-error) { background:#e9edfa; border-color:#7c8fc4; }
@media(max-width:760px) { .custom-logo-link img { max-height:46px; } }
body .tms-form :focus-visible,body .tms-gallery :focus-visible { outline-color:var(--tmg-accent); }

/* Small project labels preserve the original square-card layout. */
.tmg-project-type,.tms-project-type { position:absolute; top:11px; left:11px; padding:4px 9px; background:#f1effa; color:#4964a3; border:1px solid #ccd5ed; border-radius:4px; font-size:10px; font-weight:700; line-height:1.5; z-index:1; }
.tmg-pattern-credit,.tms-pattern-credit { font-size:11px; color:#626c86; margin-top:10px; overflow-wrap:anywhere; }
.tmg-wordmark-main { max-width:280px; overflow-wrap:anywhere; }
