/*
Theme Name: Networth
Theme URI: http://localhost:8082/
Author: Networth
Description: Celebrity net-worth terminal theme. Registers a "celebrity" custom post type whose full data.json profile is stored in Secure Custom Fields (category-wise field groups with repeaters), rendered server-side, and created/updated through the REST API (custom "data" field, deep-merge) using Application Passwords.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: networth
*/

/* Tailwind (loaded via CDN in header.php) provides utility classes.
   This file only carries a few theme-specific helpers. */

.ticking-val { font-variant-numeric: tabular-nums; }

/* Lightbox */
.nw-lb-overlay { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.9); }
.nw-lb-overlay.is-open { display: flex; }
.nw-lb-figure { margin: 0; max-width: 90vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.nw-lb-img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.nw-lb-cap { color: #fff; font-size: 13px; margin-top: 12px; text-align: center; max-width: 80vw; }
.nw-lb-btn { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer; width: 48px; height: 48px; border-radius: 999px; font-size: 28px; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.nw-lb-btn:hover { background: rgba(255,255,255,.25); }
.nw-lb-close { top: 20px; right: 20px; }
.nw-lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.nw-lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.nw-lb-count { position: absolute; top: 26px; left: 24px; color: rgba(255,255,255,.8); font-size: 12px; letter-spacing: .05em; }
@media (max-width: 640px) { .nw-lb-prev { left: 8px; } .nw-lb-next { right: 8px; } .nw-lb-btn { width: 40px; height: 40px; font-size: 22px; } }

/* WYSIWYG term description */
.nw-term-desc p { margin: 0 0 1em; }
.nw-term-desc p:last-child { margin-bottom: 0; }
.nw-term-desc h2 { font-size: 1.25rem; font-weight: 700; margin: 1.2em 0 .5em; color: var(--nw-primary, inherit); }
.nw-term-desc h3 { font-size: 1.1rem; font-weight: 700; margin: 1em 0 .5em; }
.nw-term-desc ul { list-style: disc; padding-left: 1.25em; margin: 0 0 1em; }
.nw-term-desc ol { list-style: decimal; padding-left: 1.25em; margin: 0 0 1em; }
.nw-term-desc li { margin: .25em 0; }
.nw-term-desc a { color: var(--nw-primary, #E65100); text-decoration: underline; }
.nw-term-desc blockquote { border-left: 3px solid var(--nw-primary, #E65100); padding-left: 1em; font-style: italic; margin: 0 0 1em; }
.nw-term-desc strong { font-weight: 700; }

/* Boost Profile */
.nw-spin { animation: nw-spin 0.8s linear infinite; }
@keyframes nw-spin { to { transform: rotate(360deg); } }
.nw-heart-pulse { animation: nw-heart 0.6s ease; }
@keyframes nw-heart { 0%{transform:scale(1);} 30%{transform:scale(1.5);} 60%{transform:scale(0.9);} 100%{transform:scale(1);} }
.nw-boosted { background: #16a34a !important; }

/* FAQ accordion */
.nw-faq summary { list-style: none; }
.nw-faq summary::-webkit-details-marker { display: none; }
.nw-faq[open] .nw-faq-icon { transform: rotate(180deg); }
.nw-faq-icon { transition: transform 0.2s ease; }

/* Read more */
.nw-rm-collapsed { max-height: 150px; overflow: hidden; position: relative; }
.nw-rm-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(to bottom, rgba(0,0,0,0), rgb(var(--nw-c-surface))); pointer-events: none; }
.nw-rm-expanded { max-height: none; }
.nw-rm-btn { cursor: pointer; }
.nw-rm-btn[aria-expanded="true"] .nw-rm-icon { transform: rotate(180deg); }
.nw-rm-icon { transition: transform 0.2s ease; }






/* ---------- Blog article ---------- */
.nw-article { color: rgb(var(--nw-c-on-surface)); font-size: 1.0625rem; line-height: 1.8; }
.nw-article > * + * { margin-top: 1.25rem; }
.nw-article h2 { font-size: 1.6rem; font-weight: 800; line-height: 1.3; margin-top: 2.5rem; scroll-margin-top: 6rem; color: rgb(var(--nw-c-on-surface)); }
.nw-article h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.35; margin-top: 2rem; scroll-margin-top: 6rem; color: rgb(var(--nw-c-on-surface)); }
.nw-article h4 { font-size: 1.1rem; font-weight: 700; margin-top: 1.5rem; }
.nw-article p { color: rgb(var(--nw-c-on-surface-variant)); }
.nw-article a { color: rgb(var(--nw-c-primary)); text-decoration: underline; text-underline-offset: 2px; }
.nw-article ul, .nw-article ol { padding-left: 1.5rem; color: rgb(var(--nw-c-on-surface-variant)); }
.nw-article ul { list-style: disc; }
.nw-article ol { list-style: decimal; }
.nw-article li + li { margin-top: 0.4rem; }
.nw-article blockquote { border-left: 4px solid rgb(var(--nw-c-primary)); padding: 0.5rem 0 0.5rem 1.25rem; font-style: italic; color: rgb(var(--nw-c-on-surface)); background: rgb(var(--nw-c-primary) / 0.05); border-radius: 0 0.5rem 0.5rem 0; }
.nw-article img, .nw-article figure img { border-radius: 0.75rem; height: auto; max-width: 100%; }
.nw-article figcaption { font-size: 0.85rem; color: rgb(var(--nw-c-on-surface-variant)); text-align: center; margin-top: 0.5rem; }
.nw-article code { background: rgb(var(--nw-c-surface-container-low)); padding: 0.15em 0.4em; border-radius: 0.35rem; font-size: 0.9em; }
.nw-article pre { background: rgb(var(--nw-c-surface-container-low)); padding: 1rem 1.25rem; border-radius: 0.75rem; overflow-x: auto; border: 1px solid rgb(var(--nw-c-outline-variant)); }
.nw-article pre code { background: none; padding: 0; }
.nw-article hr { border: 0; border-top: 1px solid rgb(var(--nw-c-outline-variant)); margin: 2.5rem 0; }
.nw-article table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.nw-article th, .nw-article td { border: 1px solid rgb(var(--nw-c-outline-variant)); padding: 0.6rem 0.8rem; text-align: left; }
.nw-article th { background: rgb(var(--nw-c-surface-container-low)); font-weight: 700; }

/* TOC scroll-spy */
.nw-toc-link.nw-toc-active { border-left-color: rgb(var(--nw-c-primary)); color: rgb(var(--nw-c-primary)); }

/* Comments */
.nw-comment-body p + p { margin-top: 0.75rem; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea,
.nw-comment-form textarea {
	width: 100%; border: 1px solid rgb(var(--nw-c-outline-variant)); background: rgb(var(--nw-c-surface));
	color: rgb(var(--nw-c-on-surface)); border-radius: 0.75rem; padding: 0.65rem 0.9rem; font-size: 0.95rem;
}
.comment-respond input:focus, .comment-respond textarea:focus { outline: none; border-color: rgb(var(--nw-c-primary)); }
.comment-respond label { display: inline-block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.35rem; color: rgb(var(--nw-c-on-surface)); }
.comment-respond .comment-form-author, .comment-respond .comment-form-email, .comment-respond .comment-form-url { margin-bottom: 1rem; }
.comment-respond .comment-form-cookies-consent { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.comment-respond .comment-form-cookies-consent label { margin-bottom: 0; font-weight: 400; color: rgb(var(--nw-c-on-surface-variant)); }
.comment-respond .comment-form-cookies-consent input { width: auto; }
/* Comment form layout: Name | Email side-by-side, everything else full width. */
.comment-respond .comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1rem; align-items: end; }
.comment-respond .comment-form > .comment-form-comment,
.comment-respond .comment-form > .comment-form-url,
.comment-respond .comment-form > .comment-notes,
.comment-respond .comment-form > .comment-form-cookies-consent,
.comment-respond .comment-form > .form-submit,
.comment-respond .comment-form > .logged-in-as { grid-column: 1 / -1; }
@media (max-width: 640px) { .comment-respond .comment-form { grid-template-columns: 1fr; } }
.comment-respond .comment-form p { margin: 0; }
.children { list-style: none; margin-top: 1rem; padding-left: 1.25rem; border-left: 2px solid rgb(var(--nw-c-outline-variant)); display: flex; flex-direction: column; gap: 1rem; }

/* Pagination */
.nw-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.nw-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 0.85rem; border-radius: 0.75rem; border: 1px solid rgb(var(--nw-c-outline-variant)); color: rgb(var(--nw-c-on-surface)); font-weight: 700; text-decoration: none; transition: all 0.15s ease; }
.nw-pagination .page-numbers:hover { border-color: rgb(var(--nw-c-primary)); color: rgb(var(--nw-c-primary)); }
.nw-pagination .page-numbers.current { background: rgb(var(--nw-c-primary)); color: rgb(var(--nw-c-on-primary)); border-color: rgb(var(--nw-c-primary)); }
.nw-pagination .page-numbers.dots { border: 0; }
