/* Scoped gallery styles. Hide the broken/unskinned WP admin bar only on pages using this shortcode. */
body:has(.cwg-search-tiles) #wpadminbar { display: none !important; }
body:has(.cwg-search-tiles) { margin-top: 0 !important; }
.cwg-search-tiles, .cwg-search-tiles * { box-sizing: border-box; }
.cwg-search-tiles { --cwg-text:#1f2937; --cwg-muted:#667085; --cwg-border:#d9e1ea; --cwg-bg:#f6f8fb; --cwg-card:#ffffff; --cwg-accent:#516b8d; width:100%; max-width:1280px; margin: 0 auto; padding: 24px 18px 48px; color:var(--cwg-text); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.cwg-toolbar { display:grid; grid-template-columns: minmax(240px, 1fr) minmax(150px, 210px) minmax(150px, 190px); gap:14px; align-items:center; margin: 0 0 12px; position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.94); padding: 12px 0; backdrop-filter: blur(6px); }
.cwg-search, .cwg-filter, .cwg-sort { width:100%; min-height:48px; border:1px solid var(--cwg-border); border-radius:16px; padding: 0 16px; font-size:16px; color:var(--cwg-text); background:#fff; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.cwg-count { margin: 6px 0 18px; color: var(--cwg-muted); font-weight: 600; }
.cwg-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; align-items: stretch; }
.cwg-tile { display:flex; flex-direction:column; min-height:100%; border:1px solid var(--cwg-border); border-radius:18px; overflow:hidden; background:var(--cwg-card); box-shadow: 0 4px 14px rgba(16,24,40,.07); text-decoration:none !important; color:inherit !important; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.cwg-tile:hover, .cwg-tile:focus { transform: translateY(-2px); border-color:#a9bbd1; box-shadow: 0 10px 24px rgba(16,24,40,.14); outline:none; }
.cwg-thumb { width:100%; aspect-ratio: 4 / 5; background: linear-gradient(135deg,#eef2f7,#dbe5ef); display:flex; align-items:center; justify-content:center; overflow:hidden; }
.cwg-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.cwg-placeholder { font-size:52px; color:#91a4bc; font-weight:800; }
.cwg-body { padding: 15px 16px 16px; display:flex; flex-direction:column; gap:8px; flex:1; }
.cwg-type { align-self:flex-start; font-size:12px; letter-spacing:.08em; text-transform:uppercase; font-weight:800; color:#516b8d; background:#eef4fb; border-radius:999px; padding:4px 9px; }
.cwg-title { font-size:20px; line-height:1.2; font-weight:800; color:var(--cwg-text); margin: 2px 0 4px; overflow-wrap:anywhere; }
.cwg-meta { font-size:15px; line-height:1.45; color:var(--cwg-muted); overflow-wrap:anywhere; }
.cwg-meta strong { color:#43546b; font-weight:800; }
.cwg-empty { grid-column: 1 / -1; padding:30px; text-align:center; color:var(--cwg-muted); border:1px dashed var(--cwg-border); border-radius:18px; background:#fff; }
@media (max-width: 760px) { .cwg-toolbar { grid-template-columns:1fr; position:static; } .cwg-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap:14px; } .cwg-title { font-size:18px; } }
