/* WordPress additions for the Safe PC Disposal theme */

/* Sticky header below the admin bar when logged in */
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .header { top: 0; } }

/* Honeypot field */
.spd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* reCAPTCHA */
.spd-recaptcha { margin: 0 0 18px; max-width: 100%; }
.spd-recaptcha .g-recaptcha { transform-origin: 0 0; }
@media (max-width: 380px) { .spd-recaptcha .g-recaptcha { transform: scale(.86); } }
.spd-recaptcha .field__error { display: block; }
.grecaptcha-badge { z-index: 90; }

/* Loading state */
.btn.is-loading { opacity: .7; pointer-events: none; }

/* Generic pages, blog, 404 */
.spd-page { padding: 24px 0 72px; }
.spd-page__hero { margin-bottom: 48px; }
.spd-page__hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; margin-top: 18px; font-weight: 600; }
.spd-page__hero p { color: var(--muted-light); margin: 16px 0 28px; font-size: 18px; }
.spd-page__hero--center { text-align: center; }
.spd-content { max-width: 900px; font-size: 17px; color: var(--muted); }
.spd-content > * + * { margin-top: 1.1em; }
.spd-content h2, .spd-content h3, .spd-content h4 { color: var(--text); line-height: 1.25; margin-top: 1.6em; }
.spd-content h2 { font-size: 30px; }
.spd-content h3 { font-size: 23px; }
.spd-content ul, .spd-content ol { padding-left: 1.4em; }
.spd-content ul { list-style: disc; }
.spd-content ol { list-style: decimal; }
.spd-content a { color: var(--lime-600); text-decoration: underline; }
.spd-content img { border-radius: var(--radius); }
.spd-content__thumb { margin-bottom: 28px; width: 100%; }
.spd-content table { width: 100%; border-collapse: collapse; }
.spd-content th, .spd-content td { border: 1px solid var(--border); padding: 10px; text-align: left; }
.spd-content blockquote { border-left: 4px solid var(--lime); padding-left: 18px; margin-left: 0; }

.spd-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.spd-content .spd-posts { margin-top: 0; }
.spd-content:has(.spd-posts) { max-width: 1300px; }
.spd-post { background: var(--bg-soft); border-radius: var(--radius); padding: 18px; }
.spd-post__media img { border-radius: var(--radius-sm); width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.spd-post__date { font-size: 14px; margin-top: 14px; }
.spd-post h2 { font-size: 21px; margin: 6px 0 12px; }
.spd-post h2 a { color: var(--text); text-decoration: none; }
.spd-post .link-arrow { text-decoration: none; }
.spd-pagination { margin-top: 40px; }
.spd-pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.spd-pagination .page-numbers { padding: 8px 14px; border-radius: 8px; background: var(--bg-soft); color: var(--text); text-decoration: none; }
.spd-pagination .current { background: var(--lime); }

@media (max-width: 768px) {
	.spd-page__hero { margin-bottom: 32px; }
}

/* WordPress core alignment classes */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 14px; text-align: center; }

/* Legal pages (Terms, Privacy, Cookies) */
.spd-legal__updated { margin: 14px 0 0 !important; font-size: 16px !important; }
.spd-legal__grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; align-items: start; }
.spd-legal__grid--single { grid-template-columns: minmax(0, 1fr); }
.spd-legal__toc { position: sticky; top: 120px; background: var(--bg-soft, #f4f6f3); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px; }
.admin-bar .spd-legal__toc { top: 152px; }
.spd-legal__toc-title { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text); margin-bottom: 12px; }
.spd-legal__toc ol { list-style: none; counter-reset: toc; padding: 0; margin: 0; }
.spd-legal__toc li { counter-increment: toc; }
.spd-legal__toc a { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; line-height: 1.4; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--border); transition: color .2s; }
.spd-legal__toc li:last-child a { border-bottom: 0; }
.spd-legal__toc a::before { content: counter(toc) "."; color: var(--lime-600); font-weight: 600; min-width: 20px; }
.spd-legal__toc a:hover, .spd-legal__toc a.is-active { color: var(--text); }
.spd-legal__body { max-width: 820px; }
.spd-legal__body h2 { scroll-margin-top: 120px; padding-top: 8px; }
.spd-legal__body li + li { margin-top: 6px; }
.spd-legal__body .wp-block-table { margin: 1.2em 0; overflow-x: auto; }
.spd-legal__body table { font-size: 15px; }
.spd-legal__body thead th { background: var(--dark); color: #fff; border-color: var(--dark); }
.spd-legal__body tbody tr:nth-child(even) { background: #f7f9f6; }
.spd-legal__contact { margin-top: 48px !important; background: var(--lime-100); border-radius: var(--radius); padding: 28px; }
.spd-legal__contact h3 { margin-top: 0 !important; font-size: 22px; }
.spd-legal__contact p { margin: 6px 0 14px; }
.spd-legal__contact-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 18px; }
.spd-content .spd-legal__contact .btn { text-decoration: none; color: var(--dark); }
@media (max-width: 992px) {
	.spd-legal__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.spd-legal__toc { position: static; }
}
@media (max-width: 576px) {
	.spd-legal__contact { padding: 22px 18px; }
	.spd-legal__body h2 { font-size: 24px; }
	.spd-legal__body table { font-size: 14px; }
	.spd-legal__body th, .spd-legal__body td { padding: 8px; }
}

/* Footer legal line + contact form privacy note */
.footer__bottom p + p { margin-top: 8px; }
.spd-footer-legal { font-size: 13px; line-height: 1.6; color: #8fa597; }
.spd-footer-legal span { margin: 0 6px; opacity: .6; }
.spd-footer-legal a { color: #c9d6cd; text-decoration: none; }
.spd-footer-legal a:hover { color: var(--lime); }
.cform__privacy { font-size: 13px; color: var(--muted); margin-top: 12px; }
.cform__privacy a { color: var(--lime-600); text-decoration: underline; }
