/* WordPress glue for the AEGEAN SIGNAL design system (assets/css/style.css).
   Only what WordPress adds and the comp cannot know about. No new visual language. */

/* Admin bar offset for the sticky header */
.admin-bar .hdr { top: 32px; }
@media (max-width: 782px) { .admin-bar .hdr { top: 46px; } }

/* Core alignment and media inside .prose (post bodies, plugin prose) */
.prose .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.prose .alignright { float: right; margin: .3em 0 1em 1.5em; }
.prose .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.prose img, .prose video, .prose iframe { max-width: 100%; height: auto; }
.prose .wp-block-image figcaption, .prose .wp-caption-text { font-size: .875rem; color: var(--ink-3, #4A5A66); margin-top: .5em; }
.prose .wp-block-embed iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
/* Real guide/post text can contain long unbroken strings (paths, URLs): let it wrap on phones */
.drow, .drow-desc, .drow-name, .bpost-body, .post-facts dd, .docs-nav a { overflow-wrap: anywhere; min-width: 0; }
.dindex, .dgroup { min-width: 0; }

/* Lists in prose are grids: their items must be allowed to shrink, or a long code line widens the page */
.prose ul, .prose ol { grid-template-columns: minmax(0, 1fr); }
.prose li { min-width: 0; }
.prose .code-block { max-width: 100%; }
/* a list item with a code example: label on top, the code box below at full width */
.prose li:has(> .code-block) { flex-wrap: wrap; }
.prose li > .code-block { flex: 1 0 100%; width: 100%; margin-top: 8px; }
/* inline code (shortcode or hook names in a sentence) may break on small screens */
.prose :not(pre) > code { overflow-wrap: anywhere; word-break: break-word; }

/* Code examples in prose scroll inside their box instead of widening the page */
.prod-prose, .prose { min-width: 0; }
.prose pre, .prose .wp-block-code { max-width: 100%; overflow-x: auto; white-space: pre; }
.prose pre code { white-space: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Licence portal / licence checker results: callouts, tables and buttons stacked with the design's 20px step */
.wps2-portal .callout, .wps2-licence .callout { margin-top: 20px; }
.wps2-portal [data-msg] > :first-child, .wps2-licence [data-out] > :first-child { margin-top: 0; } /* the container already has .mt-3 */
.wps2-portal [data-msg]:empty, .wps2-licence [data-out]:empty { display: none; }
.wps2-portal .ticket-aside > h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.wps2-portal .ticket-aside .btn { margin-top: 0; }
.wps2-licence .table-wrap, .wps2-licence h3 { margin-top: 20px; }

/* Affiliate signup ([wpslash_affiliate_register], mapped onto .form in inc/wps2/extra-affiliate.php) */
.wps2-affiliate .wpslash-affiliate-panel { max-width: 640px; }
.wps2-affiliate .wps2-aff-msg:empty { display: none; }
.wps2-affiliate .wps2-aff-msg { padding: 16px 18px; border-radius: var(--r, 12px); font-size: .9375rem; line-height: 1.6; border: 1px solid transparent; }
.wps2-affiliate .wps2-aff-msg.is-success { background: var(--ok-tint, #E9F5EF); border-color: rgba(27, 122, 82, .22); color: var(--ink, #0E1B26); }
.wps2-affiliate .wps2-aff-msg.is-error { background: var(--brand-wash, #FDECEC); border-color: rgba(224, 32, 32, .25); color: var(--ink, #0E1B26); }
.wps2-affiliate .wpslash-affiliate-empty-kicker { display: inline-block; }
.wps2-affiliate textarea { min-height: 140px; }

/* Affiliate dashboard ([wpslash_affiliate_dashboard]) on the design tokens */
.wps2-affdash { display: grid; gap: 24px; }
.wps2-affdash .wpslash-affiliate-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border: 1px solid var(--rule, #E4E8EC); border-radius: var(--r-lg, 18px); background: var(--surface, #fff); }
.wps2-affdash .wpslash-affiliate-welcome { font-size: 1.1875rem; font-weight: 750; color: var(--ink, #0E1B26); margin: 0 0 8px; }
.wps2-affdash .wpslash-affiliate-codebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .9375rem; color: var(--ink-3, #4A5A66); }
.wps2-affdash .wpslash-affiliate-codebox code { font-family: var(--mono, "IBM Plex Mono", monospace); background: var(--surface-2, #F1F4F6); border-radius: 8px; padding: 6px 10px; color: var(--ink, #0E1B26); }
.wps2-affdash .wpslash-affiliate-status.is-pending, .wps2-affdash .wpslash-affiliate-status.is-suspended { background: #FFF4E5; color: #8A4B00; }
.wps2-affdash .wpslash-affiliate-status.is-rejected { background: #F1F4F6; color: var(--ink-3, #4A5A66); }
.wps2-affdash .wpslash-affiliate-status.is-active, .wps2-affdash .wpslash-affiliate-status.is-approved, .wps2-affdash .wpslash-affiliate-status.is-paid, .wps2-affdash .wpslash-affiliate-status.is-completed { background: var(--ok-tint, #E9F5EF); color: #1B7A52; }
.wps2-affdash .wpslash-affiliate-tabs { gap: 8px; }
.wps2-affdash .tab.is-active { background: var(--ink, #0E1B26); border-color: var(--ink, #0E1B26); color: #fff; }
.wps2-affdash .wpslash-affiliate-tab-panel { display: grid; gap: 24px; }
.wps2-affdash .wpslash-affiliate-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.wps2-affdash .wpslash-affiliate-card { display: grid; gap: 6px; padding: 20px; border: 1px solid var(--rule, #E4E8EC); border-radius: var(--r-lg, 18px); background: var(--surface, #fff); }
.wps2-affdash .wpslash-affiliate-card > span { font-size: .8125rem; font-weight: 700; color: var(--ink-4, #67757F); }
.wps2-affdash .wpslash-affiliate-card > strong { font-size: 1.75rem; font-weight: 750; color: var(--ink, #0E1B26); font-variant-numeric: tabular-nums; }
.wps2-affdash .wpslash-affiliate-card > small { font-size: .875rem; color: var(--ink-4, #67757F); }
.wps2-affdash .wpslash-affiliate-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.wps2-affdash .wpslash-affiliate-panel-head h3 { font-size: 1.1875rem; font-weight: 750; color: var(--ink, #0E1B26); margin: 0 0 6px; }
.wps2-affdash .wpslash-affiliate-panel-head p { color: var(--ink-3, #4A5A66); margin: 0; }
.wps2-affdash .wpslash-affiliate-progress-pct { font-size: 1.5rem; font-weight: 750; color: var(--ink, #0E1B26); }
.wps2-affdash .wpslash-affiliate-progress { height: 10px; border-radius: 99px; background: var(--surface-2, #F1F4F6); overflow: hidden; }
.wps2-affdash .wpslash-affiliate-progress > span { display: block; height: 100%; background: var(--brand, #E02020); border-radius: inherit; }
.wps2-affdash .wpslash-affiliate-progress-note { margin-top: 10px; }
.wps2-affdash .wpslash-affiliate-links { display: grid; gap: 16px; }
.wps2-affdash .wpslash-affiliate-link label { display: block; font-weight: 650; color: var(--ink, #0E1B26); margin-bottom: 6px; }
.wps2-affdash .wpslash-affiliate-link > div { display: flex; gap: 8px; }
.wps2-affdash .wpslash-affiliate-link input { flex: 1; min-width: 0; font-family: var(--mono, "IBM Plex Mono", monospace); font-size: .8125rem; }
.wps2-affdash .table-wrap { margin-top: 4px; }
@media (max-width: 980px) { .wps2-affdash .wpslash-affiliate-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .wps2-affdash .wpslash-affiliate-cards { grid-template-columns: 1fr; } .wps2-affdash .wpslash-affiliate-link > div { flex-direction: column; } }

/* Checkout button from wpslash-digital-products: the wrapper must not change the layout */
.wps2-buy { display: contents; }
.wps2-buy button.btn { font: inherit; cursor: pointer; }
.wps2-buy .wpslash-dp-checkout-status { display: block; font-size: .875rem; color: var(--ink-4, #67757F); margin-top: 6px; }
.wps2-buy .wpslash-dp-checkout-status:empty { display: none; }
.wps2-buy .wpslash-dp-admin-warning { font-size: .8125rem; color: var(--ink-3, #4A5A66); background: #FFF4E5; border-radius: 8px; padding: 8px 10px; margin: 0 0 8px; }

/* Blocks are full sections: no core block margins between them */
.wps2-blocks > * { margin-block: 0; }
.wps2-blocks > .wp-block-group, .wps2-blocks > p { max-width: var(--wrap, 1200px); margin-inline: auto; }
