/* GST Toolkit — global utility styles. Tokens come from theme.json vars. */

.gst-accent { color: var(--wp--preset--color--primary); }

/* Sticky header */
.gst-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--border);
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
}
.gst-header .wp-block-navigation a { text-decoration: none; color: var(--wp--preset--color--medium); }
.gst-header .wp-block-navigation a:hover { color: var(--wp--preset--color--dark); }
.gst-header-cta .wp-block-button__link { padding: 9px 16px; font-size: 13.5px; }

/* Cards */
.gst-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	box-shadow: var(--wp--custom--shadow--sm);
	overflow: hidden;
}
.gst-tool-card { transition: box-shadow .15s ease, transform .15s ease; }
.gst-tool-card:hover { box-shadow: var(--wp--custom--shadow--md); transform: translateY(-2px); }
.gst-tool-card h3 a, .gst-card h3 a { text-decoration: none; color: var(--wp--preset--color--dark); }
.gst-pad { padding: 24px; }

/* Trust bar */
.gst-trust-bar {
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
	gap: 40px !important;
}

/* Privacy banner */
.gst-privacy {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	background: var(--wp--preset--color--primary-soft);
	border: 1px solid #DBEAFE;
	border-radius: var(--wp--custom--radius--md);
}

/* Edge comparison */
.gst-edge-col {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--md);
	padding: 26px;
	background: var(--wp--preset--color--white);
}
.gst-edge-us {
	border: 2px solid var(--wp--preset--color--primary);
	box-shadow: var(--wp--custom--shadow--md);
}
.gst-edge-x, .gst-edge-v {
	font-size: 14px;
	color: var(--wp--preset--color--medium);
	border-top: 1px solid var(--wp--preset--color--light);
	padding-top: 9px;
	margin-top: 9px;
}
.gst-edge-v strong { color: var(--wp--preset--color--dark); }

/* CTA */
.gst-cta {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	background: linear-gradient(180deg, #F8FAFF, #EFF4FF);
	border: 1px solid #DBEAFE;
	border-radius: var(--wp--custom--radius--lg);
}

/* Footer links */
.gst-footer a { color: #9CA3AF; text-decoration: none; }
.gst-footer a:hover { color: var(--wp--preset--color--white); }
.gst-footer .wp-block-site-title a { color: var(--wp--preset--color--white); }
.gst-footer-nav .wp-block-navigation__container { gap: 9px; }
.gst-footer-nav .wp-block-navigation-item__content { font-size: 13.5px; }

/* Equal-height cards + consistent row/column gaps in Query Loop grids */
.wp-block-post-template.is-layout-grid { gap: 20px !important; }
.wp-block-post-template.is-layout-grid > .wp-block-post { display: flex; }
.wp-block-post-template.is-layout-grid > .wp-block-post > .gst-card { width: 100%; display: flex; flex-direction: column; }

/* Article cards: uniform cover-cropped thumbnails */
.gst-article-card .wp-block-post-featured-image { margin: 0; }
.gst-article-card .wp-block-post-featured-image img {
	width: 100%; height: 150px; object-fit: cover; display: block;
}

/* =====================================================================
 * Shared tool UI (used by all gst tool blocks: invoice, payslip, qr-menu,
 * resume). Lives here (site-wide) because block styles only enqueue when
 * their own block is on the page.
 * =================================================================== */

/* WP front end doesn't apply border-box globally — without this, padded
   inputs overflow their grid cells and fields overlap. */
.gst-invgen, .gst-invgen *,
.gst-payslip, .gst-payslip *,
.gst-qrmenu, .gst-qrmenu *,
.gst-resume, .gst-resume *,
.gst-showcase, .gst-showcase * { box-sizing: border-box; }
/* gst/invoice-generator */
.gst-invgen { font-size: 16px; }
.gst-invgen-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .gst-invgen-grid { grid-template-columns: 1fr; } }

.gst-panel {
	background: #fff;
	border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: var(--wp--custom--radius--md, 12px);
	box-shadow: var(--wp--custom--shadow--sm, 0 1px 2px rgba(17,24,39,.05));
	padding: 24px;
}
.gst-panel h3 {
	font-size: 15px; margin: 20px 0 14px;
	display: flex; justify-content: space-between; align-items: center;
}
.gst-panel h3:first-child { margin-top: 0; }
.gst-hint { color: var(--wp--preset--color--medium, #6B7280); font-weight: 400; font-size: 12.5px; }

.gst-field { margin-bottom: 14px; }
.gst-field label {
	display: block; font-size: 12.5px; font-weight: 600;
	color: var(--wp--preset--color--medium, #6B7280); margin-bottom: 5px;
}
.gst-field input, .gst-field select {
	width: 100%; border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 8px; padding: 10px 12px; font-size: 14px; font-family: inherit; background: #fff;
}
.gst-field input:focus, .gst-field select:focus { outline: 2px solid var(--wp--preset--color--primary, #2563EB); border-color: transparent; }
.gst-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gst-row2 .gst-field { margin-bottom: 8px; }

.gst-item-row { display: grid; grid-template-columns: 2fr .7fr 1fr auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.gst-item-x { background: none; border: none; color: var(--wp--preset--color--medium, #6B7280); cursor: pointer; font-size: 16px; padding: 10px 4px; }
.gst-add-item {
	background: none; border: 1px dashed var(--wp--preset--color--border, #E5E7EB);
	border-radius: 8px; width: 100%; padding: 10px; color: var(--wp--preset--color--primary, #2563EB);
	font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: inherit;
}
.gst-add-item:hover { background: var(--wp--preset--color--primary-soft, #EFF4FF); }
.gst-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--wp--preset--color--medium, #6B7280); cursor: pointer; margin-top: 6px; }
.gst-check input { width: auto; }

/* Invoice document */
.gst-inv-doc {
	border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 8px; padding: 26px; font-size: 13px;
	position: relative; overflow: hidden; background: #fff;
}
.gst-inv-wm { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.gst-inv-wm span {
	font-family: var(--wp--preset--font-family--heading, sans-serif); font-weight: 800;
	font-size: 34px; color: rgba(37, 99, 235, .09); transform: rotate(-24deg); white-space: nowrap;
}
.is-unlocked .gst-inv-wm { display: none; }
.gst-inv-top { display: flex; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.gst-inv-top h4 { font-size: 19px; margin: 0; }
.gst-p-doclabel { color: var(--wp--preset--color--medium, #6B7280); font-size: 11.5px; }
.gst-inv-no { color: var(--wp--preset--color--medium, #6B7280); text-align: right; font-size: 12px; }
.gst-inv-parties { margin-bottom: 18px; color: var(--wp--preset--color--medium, #6B7280); font-size: 12px; }
.gst-inv-parties b { color: var(--wp--preset--color--dark, #111827); display: block; font-size: 13px; }
.gst-inv-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.gst-inv-table th {
	text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
	color: var(--wp--preset--color--medium, #6B7280);
	border-bottom: 1px solid var(--wp--preset--color--border, #E5E7EB); padding: 6px 4px;
}
.gst-inv-table td { padding: 8px 4px; border-bottom: 1px solid var(--wp--preset--color--light, #F3F4F6); font-size: 13px; }
.gst-inv-table .num { text-align: right; }
.gst-inv-totals { margin-left: auto; width: 58%; font-size: 13px; }
.gst-inv-totals > div { display: flex; justify-content: space-between; padding: 4px 0; }
.gst-grand { border-top: 2px solid var(--wp--preset--color--dark, #111827); font-weight: 700; font-size: 15px; margin-top: 4px; padding-top: 8px; }
.gst-inv-pay {
	display: flex; gap: 12px; align-items: center; margin-top: 14px;
	border-top: 1px dashed var(--wp--preset--color--border, #E5E7EB); padding-top: 12px;
	font-size: 11px; color: var(--wp--preset--color--medium, #6B7280); line-height: 1.5;
}
.gst-inv-pay svg { display: block; }
.gst-invgen[data-noqr] .gst-inv-pay { display: none; }

/* Buttons */
.gst-dl-row { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.gst-btn-free, .gst-btn-paid {
	font-family: inherit; font-weight: 600; font-size: 14.5px;
	border-radius: 8px; padding: 12px 20px; cursor: pointer; border: none;
}
.gst-btn-free { background: #fff; color: var(--wp--preset--color--dark, #111827); border: 1px solid var(--wp--preset--color--border, #E5E7EB); }
.gst-btn-free:hover { background: var(--wp--preset--color--light, #F3F4F6); }
.gst-btn-paid { background: var(--wp--preset--color--success, #16A34A); color: #fff; }
.gst-btn-paid:hover { background: #15803D; }
.gst-btn-paid.is-done { box-shadow: 0 0 0 3px #BBF7D0; }
.gst-paid-banner {
	background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534;
	border-radius: 8px; padding: 12px 16px; font-size: 13.5px; margin-top: 18px;
	animation: gstBannerIn .4s ease;
}
@keyframes gstBannerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.gst-dl-note { font-size: 12.5px; color: var(--wp--preset--color--medium, #6B7280); margin-top: 10px; }

/* Print: only the invoice document */
@media print {
	body.gst-printing * { visibility: hidden !important; }
	body.gst-printing .gst-inv-doc, body.gst-printing .gst-inv-doc * { visibility: visible !important; }
	body.gst-printing .gst-inv-doc {
		position: fixed; inset: 0; border: none; border-radius: 0;
		padding: 24mm 18mm; font-size: 14px; overflow: visible;
	}
}

/* =====================================================================
 * Articles listing (/articles/ via the Posts page) + category archives.
 * Templates: templates/home.html, templates/category.html
 * =================================================================== */

/* Category filter chips (core/categories rendered as a pill row) */
.gst-cat-chips,
ul.gst-cat-chips {
	list-style: none;
	margin: 20px 0 30px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
/* the li is the pill, so core's "(3)" post count sits inside it */
.gst-cat-chips li {
	margin: 0;
	background: var(--wp--preset--color--white, #fff);
	border: 1px solid var(--wp--preset--color--border, #E5E7EB);
	border-radius: 99px;
	padding: 7px 15px;
	font-size: 12px;
	color: var(--wp--preset--color--medium, #6B7280);
	transition: border-color .15s ease, background .15s ease;
}
.gst-cat-chips li:hover { border-color: var(--wp--preset--color--primary, #2563EB); background: var(--wp--preset--color--primary-soft, #EFF4FF); }
.gst-cat-chips a {
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--wp--preset--color--medium, #6B7280);
}
.gst-cat-chips li:hover a { color: var(--wp--preset--color--primary, #2563EB); }

/* Article cards */
.gst-article-card { height: fit-content; }
.gst-article-card .wp-block-post-title { margin: 4px 0 8px; }
.gst-article-card .wp-block-post-title a { text-decoration: none; }
.gst-article-card .wp-block-post-title a:hover { color: var(--wp--preset--color--primary, #2563EB); }
.gst-article-card .wp-block-post-excerpt { margin: 0 0 12px; }
.gst-article-card .wp-block-post-excerpt__excerpt { margin: 0; line-height: 1.55; }

/* Category label above the title */
.gst-art-cat {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin: 0;
}
.gst-art-cat a {
	text-decoration: none;
	color: var(--wp--preset--color--primary, #2563EB);
}
.gst-art-date { margin: 0; }

/* Cards with no featured image shouldn't leave a gap at the top */
.gst-article-card .wp-block-post-featured-image:empty { display: none; }

/* Pagination */
.wp-block-query-pagination { margin-top: 36px; gap: 6px; }
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	text-decoration: none;
	border-radius: 8px;
	padding: 7px 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--wp--preset--color--medium, #6B7280);
}
.wp-block-query-pagination a:hover {
	background: var(--wp--preset--color--primary-soft, #EFF4FF);
	color: var(--wp--preset--color--primary, #2563EB);
}
.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--primary, #2563EB);
	color: #fff;
}
