/*
Theme Name: PNGEgg Local
Description: A searchable transparent PNG catalog with local downloads and responsive masonry galleries.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
*/
:root { --teal: #2f9c99; --link: #248e8b; --ink: #162d5a; --gap: 24px; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; color: #333; background: #fff; font: 13px Roboto, Arial, sans-serif; }
main { flex: 1; }
a { color: var(--link); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #126e83; outline-offset: 3px; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { clip-path: none; width: auto; height: auto; z-index: 10; top: 8px; left: 8px; padding: 10px; background: white; }
.portal { height: 552px; flex: none; text-align: center; position: relative; overflow: hidden; background: #fafafe; }
.portal::before, .portal::after { content: ""; position: absolute; bottom: 0; pointer-events: none; }
.portal::before { left: 633px; right: 0; height: 112px; background: url(assets/leaf.png) repeat-x left bottom; }
.portal::after { left: 50px; width: 526px; height: 193px; background: url(assets/hill.png) no-repeat left bottom; }
.brand { display: inline-block; line-height: 0; }
.portal .brand { margin: 120px 0 83px; }
.brand img { width: 260px; height: auto; }
.search { position: relative; }
.portal .search { margin: 0 auto; max-width: 700px; width: 90%; }
.search input { display: block; width: 100%; height: 50px; padding: 0 54px 0 20px; border: 3px solid #40b3af; border-radius: 32px; background: white; color: #333; font-size: 15px; }
.search input::placeholder { color: #888; }
.search button { position: absolute; right: 4px; top: 0; height: 100%; width: 48px; background: transparent; color: #40b3af; border: 0; display: grid; place-items: center; }
.search button span { display: block; width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 50%; position: relative; transform: translate(-2px,-2px); }
.search button span::after { content: ""; position: absolute; width: 8px; height: 2px; background: currentColor; transform: rotate(45deg); left: 10px; top: 12px; }
.topics { margin: 35px auto 0; width: min(700px,90%); }
.topics a { display: inline-block; padding: 0 5px 8px; }
.portal-title { margin: .67em 0; padding: 20px 10px; color: var(--ink); font-size: 22px; line-height: 28px; text-align: center; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,350px),350px)); align-items: start; justify-content: center; gap: var(--gap); margin: 0 auto; width: calc(100% - 24px); }
.gallery.laid-out { display: block; position: relative; }
.gallery.laid-out .card { position: absolute; top: 0; left: 0; width: min(100%,350px); }
.card { overflow: hidden; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); background: white; }
.card a { display: block; text-decoration: none; color: #222; }
.card a:focus-visible { outline-offset: -3px; }
.checker { background-color: #fff; background-image: repeating-conic-gradient(#efefef 0% 25%, transparent 0% 50%); background-size: 16px 16px; }
.card .checker { border-top: 1px solid white; }
.card img { display: block; width: 100%; height: auto; }
.card a:hover img { opacity: .9; }
.caption { display: block; text-align: center; line-height: 22px; padding: 5px; }
.metadata { display: flex; justify-content: space-between; padding: 0 10px; border-top: 1px solid #f2f2f2; background: #fafafa; color: #666; font-size: 12px; line-height: 32px; }
.metadata span { padding-left: 30px; background: url(assets/artboard.svg) no-repeat left center / 24px; }
.metadata span + span { background-image: url(assets/folder.svg); }
.more, .download, .resize button { display: block; text-align: center; color: white; border: 0; border-radius: 3px; text-decoration: none; background: var(--teal); }
.more { width: 220px; line-height: 42px; margin: 34px auto 30px; background: #00a9af; }
.more:hover, .download:hover, .resize button:hover { background: #247f7d; }
.site-footer { margin-top: 50px; min-height: 85px; display: grid; place-items: center; background: #e6e6e6; box-shadow: inset 0 1px 3px #0003; }
.site-footer a { color: #333; text-decoration: none; margin: 0 8px; }
.site-footer a:hover { text-decoration: underline; }
.to-top { position: fixed; bottom: 20px; right: 20px; width: 45px; height: 45px; border: 0; border-radius: 5px; background: #000 url(assets/totop.svg) no-repeat center / 72%; opacity: .3; z-index: 4; }
.to-top:hover { opacity: .8; }
.toolbar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 20px; height: 58px; flex: none; padding: 0 max(16px, calc((100% - 1230px)/2)); background: rgb(255 255 255 / 95%); box-shadow: 0 1px 3px #0002; }
.admin-bar .toolbar { top: 32px; }
.toolbar .brand img { width: 160px; }
.toolbar .search { flex: 1; }
.toolbar input { height: 35px; border-radius: 3px; background: #f5f5f5; border: 1px solid #ddd; padding-left: 12px; font-size: 13px; }
.strip { font-size: 14px; text-align: center; color: #005d5a; background: white; border-top: 1px solid #ddd; box-shadow: 0 1px 3px #0002; line-height: 22px; margin: 0 0 20px; padding: 10px; }
body.single, body.search-results, body.tag { background: #f6f6f6; }
.detail { width: min(1230px,96%); margin: 20px auto; display: grid; grid-template-columns: minmax(0,910px) minmax(240px,300px); gap: 20px; align-items: start; }
.panel { background: white; box-shadow: 0 1px 3px #0002; }
.preview { padding: 5px; }
.preview figure { margin: 0; text-align: center; }
.preview img { max-width: 100%; max-height: 700px; height: auto; width: auto; display: block; margin: auto; }
.preview figcaption { padding: 10px; line-height: 24px; }
.download { margin-top: 15px; padding: 13px; font-size: 15px; }
aside .panel { margin-bottom: 20px; }
.panel h2 { padding: 14px 16px; font-size: 16px; margin: 0; border-bottom: 1px solid #ddd; }
dl { padding: 4px 16px; margin: 0; }
dl div { display: flex; justify-content: space-between; gap: 8px; padding: 13px 0; }
dl div + div { border-top: 1px solid #eee; }
dd { margin: 0; }
.resize form { padding: 14px; }
.axes, .resize-row { display: flex; gap: 10px; margin-bottom: 10px; }
.axes label { cursor: pointer; }
.resize input[type=number] { width: 100%; min-width: 0; padding: 8px; border: 1px solid #ccc; }
.resize button { padding: 0 18px; }
.credits, .tag-list { padding: 0 5px; color: #555; line-height: 1.7; }
.tag-list a { margin-right: 6px; }
.text-page, .empty { margin: 40px auto; width: min(92%, 760px); line-height: 1.7; font-size: 16px; }
.empty { text-align: center; }
.comment-form input:not([type=submit]), .comment-form textarea { display: block; width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 3px; font: inherit; }
.comment-form .submit { border: 0; border-radius: 3px; padding: 10px 18px; color: white; background: var(--teal); cursor: pointer; }
@media (max-width:930px) {
    .topics { display: none; }
    .detail { grid-template-columns: 1fr; }
}
@media (max-width:600px) {
    .portal::after { left: 0; max-width: 100%; background-size: contain; }
    .toolbar { gap: 12px; }
    .toolbar .brand img { width: 108px; }
    .portal-title { font-size: 20px; }
    .admin-bar .toolbar { top: 46px; }
}
