/* =============================================================================
   Scamboard Cases UI — Filter, Sort & Search  (v1.2.0)
   Components: .scu-filter-sort | .scu-collapsible | .scu-search | .scu-grid
   ============================================================================= */

/* ── Shared button base ────────────────────────────────────────────────────── */

button.scu-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	appearance: none;
	-webkit-appearance: none;
	border: none;
	cursor: pointer;
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1;
	max-width: 100px;
	padding: 0.625rem 1.375rem;
	border-radius: 10px;
	transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
	white-space: nowrap;
}

button.scu-btn--apply,
button.scu-btn--search {
	background-color: var(--e-global-color-e4f6fd7, #1A66F8);
	color: var(--e-global-color-36221fb, #F2F2F2);
}

button.scu-btn--apply:hover,
button.scu-btn--search:hover {
	background-color: var(--e-global-color-3198af1, #1A66F87A);
	color: var(--e-global-color-36221fb, #F2F2F2);
	outline: none;
}

button.scu-btn--apply:focus-visible,
button.scu-btn--search:focus-visible {
    background-color: var(--e-global-color-text, #444444);
}

button.scu-btn--apply:focus-within,
button.scu-btn--search:focus-within {
    background-color: var(--e-global-color-text, #444444);
    color: var(--e-global-color-9bb1292, #696969);
	outline: none;
}

/*button.scu-btn--search {
    flex: 1; /* Takes 1 part of the space
}*/

button.scu-btn--reset {
	background-color: transparent;
	color: var(--e-global-color-11f9f22, #ADADAD);
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 3px;
	padding-left: 0;
	padding-right: 0;
}

button.scu-btn--reset:hover,
button.scu-btn--reset:focus-visible,
button.scu-btn--reset:focus-within {
	color: var(--e-global-color-11f9f22, #ADADAD);
	background-color: transparent;
	outline: none;
}

/* ── Collapsible panel ─────────────────────────────────────────────────────── */

.scu-filter-sort {
	display: flex;
	flex-direction: row;
	gap: 50px;
}

.scu-collapsible {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

button.scu-collapsible__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: none;
	padding: 0.875rem 0;
	cursor: pointer;
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 1rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--e-global-color-36221fb, #F2F2F2);
	text-align: left;
}

button.scu-collapsible__toggle:hover,
button.scu-collapsible__toggle:focus-visible,
button.scu-collapsible__toggle:focus-within {
	color: var(--e-global-color-e4f6fd7, #1A66F8);
	outline: none;
	background-color: transparent;
}

/* Chevron icon via CSS */
.scu-collapsible__icon {
	display: inline-block;
	width: 0.75rem;
	height: 0.75rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	flex-shrink: 0;
	margin-left: 0.5rem;
}

.scu-collapsible--open .scu-collapsible__icon {
	transform: rotate(-135deg);
}

.scu-collapsible__body {
	padding-bottom: 1.25rem;
}

.scu-collapsible__body[hidden] {
	display: none;
}

/* ── Filter group labels ────────────────────────────────────────────────────── */

.scu-filter__group {
	margin-bottom: 1rem;
}

.scu-filter__group:last-of-type {
	margin-bottom: 0;
}

.scu-filter__group-label {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--e-global-color-36221fb, #f2f2f2);
	margin: 0 0 0.5rem;
}

/* ── Tile base ─────────────────────────────────────────────────────────────── */

button.scu-tile {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--e-global-color-text, #444444);
	background-color: var(--e-global-color-36221fb, #f2f2f2);
	border: 1px solid var(--e-global-color-36221fb, #f2f2f2);
	border-radius: 10px;
	padding: 0.5rem 0.875rem;
	transition: border-color 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
	user-select: none;
	-webkit-user-select: none;
	text-align: center;
}

button.scu-tile:hover,
button.scu-tile:focus-visible {
	border: 1px solid var(--e-global-color-0532e6e, #C4C4C4);
	background-color: var(--e-global-color-0532e6e, #C4C4C4);
	color: var(--e-global-color-text, #444444);
	outline: none;
}

/* Filter tiles: dimmed + highlighted border when selected — this is the
   at-rest persistent state, must exist independently of :hover/:focus 
button.scu-tile--active {
	border: 1px solid var(--e-global-color-11f9f22, #ADADAD);
	background-color: var(--e-global-color-11f9f22, #ADADAD);
	color: var(--e-global-color-36221fb, #f2f2f2);
	outline: none;
}*/

/* Filter tiles: dimmed when selected */
button.scu-tile--active,
button.scu-tile:focus-within,
button.scu-tile--active:focus-within {
	border: 1px solid var(--e-global-color-11f9f22, #ADADAD);
	background-color: var(--e-global-color-11f9f22, #ADADAD);
	color: var(--e-global-color-36221fb, #f2f2f2);
	outline: none;
}

/*button.scu-tile--active:hover,
button.scu-tile--active:focus-visible {
	opacity: 0.7;
}*/

/* ── Encounter tiles — horizontal wrap (same style as sort) ────────────────── */

.scu-filter__tiles--encounters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.scu-tile--encounter {
	font-size: 0.9375rem;
	padding: 0.5rem 0.875rem;
}

/* ── Country tiles — square grid, flag on top + name below ────────────────── */

.scu-filter__tiles--countries {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(4rem, 1fr));
	grid-auto-rows: 1fr;
	gap: 0.5rem;
}

button.scu-tile--country {
	display: flex; /* Ensure flex is active */
	flex-direction: column;
	gap: 0.3rem;
	padding: 0.625rem 0.375rem; /* Slightly increased side padding to 0.5rem */
	/*aspect-ratio: 1 / 1;*/
	height: 100%;
	font-size: 0.8125rem;
	align-items: center;
	justify-content: center;
	box-sizing: border-box; /* Makes sure the padding doesn't break the square aspect ratio */
}

.scu-tile__flag {
	font-size: 2rem;
	line-height: 1;
	display: block;
	flex-shrink: 0;
}

.scu-tile__label {
	font-size: 0.6875rem;
	line-height: 1.25;
	text-align: center;
	display: block;
	max-width: 100%;       /* Forces the text container to stay within the card bounds */
	white-space: normal;    /* Tells the browser that line breaks are allowed */
	overflow-wrap: anywhere; /* Allows breaking between words naturally */
	word-break: normal;     /* Guarantees whole words won't be chopped in half */
}

/* ── Sort tiles — compact horizontal wrap ──────────────────────────────────── */

.scu-filter__tiles--sort {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.scu-tile--sort {
	font-size: 0.875rem;
	padding: 0.4375rem 0.875rem;
}

/* Sort active tile: highlighted (shows current choice, not dimmed) */
.scu-tile--sort.scu-tile--active {
	border: 1px solid var(--e-global-color-11f9f22, #ADADAD);
	background-color: var(--e-global-color-11f9f22, #ADADAD);
	color: var(--e-global-color-36221fb, #f2f2f2);
	outline: none;
}

.scu-tile--sort.scu-tile--active:hover,
.scu-tile--sort.scu-tile--active:focus-visible {
	border: 1px solid var(--e-global-color-0532e6e, #C4C4C4);
	background-color: var(--e-global-color-0532e6e, #C4C4C4);
	color: var(--e-global-color-text, #444444);
	outline: none;
}

/* ── Filter actions row ────────────────────────────────────────────────────── */

.scu-filter__actions {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin-top: 1rem;
}

.scu-filter__actions--sort {
	margin-top: 0;
}

/* ── Search bar ────────────────────────────────────────────────────────────── */

.scu-search {
	display: flex;
    flex-direction: row;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%; /* Limits the row width so it doesn't span infinitely on huge desktops */
}

.scu-search__field-wrap {
	/*flex: 4;*/
	min-width: 1012px; /* Add this to prevent flex child layout breakdown */
	background-color: transparent;
}

.scu-search__input {
	width: 100% !important;
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 1.2rem;
	font-weight: 400;
	color: var(--e-global-color-text, #444444);
	background-color: var(--e-global-color-36221fb, #f2f2f2);
	border: 1px solid var(--e-global-color-36221fb, #f2f2f2) !important;
	border-radius: 10px !important;
	padding: 0.5rem 2.25rem 0.5rem 0.9rem !important;
	line-height: 1;
	transition: border-color 0.15s ease !important;
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
}

.scu-search__input::-webkit-search-cancel-button,
.scu-search__input::-webkit-search-decoration {
	-webkit-appearance: none;
}

.scu-search__input:focus {
	border-color: var(--e-global-color-e4f6fd7, #1A66F8);
	outline: none;
}

button.scu-search__clear,
button.scu-search__clear:hover,
button.scu-search__clear:focus-visible {
	position: absolute;
	right: 115px;
	top: 50%;
	transform: translateY(-50%);
	appearance: none;
	-webkit-appearance: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: 1.2rem;
	line-height: 1;
	width: 35px;
    height: 35px;
    color: var(--e-global-color-text, #444444);
	background: var(--e-global-color-5dad491);
    border: 1px solid var(--e-global-color-5dad491);
    border-radius: 50%;
    outline: none;
	transition: color 0.15s ease;
}

button.scu-search__clear[hidden] {
	display: none;
}

/* ── Index breadcrumb (shown when filters/search are active) ───────────────── */

.scu-index-breadcrumb {
	display: none;
	padding: 0.5rem 0 0.25rem;
}

.scu-index-breadcrumb--visible {
	display: block;
}

.scu-index-breadcrumb__link {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 1rem;
	font-weight: 400;
	color: var(--e-global-color-588b36d, #EBEBEB);
	text-decoration: underline;
	text-decoration-style: dotted;
	text-underline-offset: 3px;
	transition: color 0.15s ease;
}

.scu-index-breadcrumb__link:hover,
.scu-index-breadcrumb__link:focus-visible {
	color: var(--e-global-color-e4f6fd7, #1A66F8);
	outline: none;
}

/* ── Cases grid ────────────────────────────────────────────────────────────── */

.scu-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: stretch;
	gap: 5rem 1.5rem;
}

/*
 * Zone 8 — Related Cases (v1.5.5).
 * Same card design as the archive grid (.scu-grid__item is shared), but the
 * column tracks use a fixed width derived from the 3-column layout instead
 * of 1fr, and justify-content: start left-aligns short rows. This is what
 * stops a 2-card result (min-2 guard in get_related_case_ids()) from being
 * stretched wide to look like it's filling 3 slots — the cards keep the
 * exact width they'd have in a full 3-card row.
 */
.scu-grid--related {
	grid-template-columns: repeat(3, minmax(0, calc((100% - 2 * 1.5rem) / 3)));
	justify-content: start;
}

@media (max-width: 782px) {
	.scu-grid--related {
		grid-template-columns: repeat(2, minmax(0, calc((100% - 1.5rem) / 2)));
	}
}

@media (max-width: 550px) {
	.scu-grid--related {
		grid-template-columns: minmax(0, 1fr);
		justify-content: stretch;
	}
}

/*
 * .scu-grid--related-empty is the marker class render_related_cases()
 * outputs instead of returning '' when there are fewer than 2 related
 * cases (see class-scu-filter.php). It exists so an Elementor container
 * can detect it via :has() and swap in a fallback CTA — but if that
 * Elementor setup isn't in place on a given page, this still collapses
 * the marker div itself so it never reserves visible grid space (gap,
 * min-height, etc.) on its own.
 */
.scu-grid--related-empty {
	display: none;
}

.scu-grid__item {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding-top: 20px;
	background-color: var(--e-global-color-36221fb, #f2f2f2);
	border-radius: 10px;
	overflow: hidden;
}

.scu-grid__thumb-link {
	display: flex;         /* 1. Changed from block to flex */
	justify-content: center;/* 2. Centers the image horizontally */
	align-items: center;    /* 3. Centers the image vertically */
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.scu-grid__thumb {
	width: 90%;
	height: 90%;
	object-fit: cover;
	display: block;
	transition: transform 0.2s ease;
}

.scu-grid__item:hover .scu-grid__thumb {
	transform: scale(1.03);
}

.scu-grid__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.5rem;
	gap: 0.5rem;
}

/* Taxonomy term tags — encounter and country are separate rows now, each a
   fixed height regardless of term-name length or count, so the elements
   below (title, summary, footer) land in the same place on every card. */
.scu-grid__meta-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	min-height: 1.6rem;
}

.scu-grid__term {
	display: inline-block;
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	text-decoration: none;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	transition: opacity 0.15s ease;
}

.scu-grid__term--encounter {
	background-color: var(--e-global-color-e4f6fd7, #1A66F8);
	color: var(--e-global-color-36221fb, #f2f2f2);
}

.scu-grid__term--country {
	background-color: var(--e-global-color-text, #444444);
	color: var(--e-global-color-36221fb, #f2f2f2);
}

.scu-grid__term--encounter:hover {
	background-color: var(--e-global-color-3198af1, #1A66F87A);
	color: var(--e-global-color-36221fb, #f2f2f2);
}

.scu-grid__term--country:hover {
	background-color: var(--e-global-color-7f53981, #969696);
	color: var(--e-global-color-36221fb, #f2f2f2);
}

.scu-grid__title {
	font-family: var(--e-global-typography-1bde84a-font-family);
	font-size: var(--e-global-typography-1bde84a-font-size);
	font-weight: var(--e-global-typography-1bde84a-font-weight);
	line-height: var(--e-global-typography-1bde84a-line-height);
	margin: 0;
	color: var(--e-global-color-text, #444444);
}

.scu-grid__title-link {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

.scu-grid__title-link:hover,
.scu-grid__title-link:focus-visible {
	color: var(--e-global-color-7f53981, #969696);
	outline: none;
}

/* Case summary — linked, truncated */
.scu-grid__summary {
	flex: 1;
}

.scu-grid__summary-link {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--e-global-color-9bb1292, #696969);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.15s ease;
}

.scu-grid__summary-link:hover,
.scu-grid__summary-link:focus-visible {
	color: var(--e-global-color-7f53981, #969696);
	outline: none;
}

/* Perpetrator name + organisation */
.scu-grid__perp {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.5rem;
	align-items: baseline;
}

.scu-grid__perp-name {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--e-global-color-text, #444444);
}

.scu-grid__perp-org {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--e-global-color-9bb1292, #696969);
}

/* Footer row — always a single line. Location is the flexible element and
   truncates with an ellipsis rather than wrapping (which used to push the
   date/amount down inconsistently depending on location text length). */
.scu-grid__footer {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.5rem;
	border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.scu-grid__location {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: clip;
}

.scu-grid__date {
	flex: 0 0 auto;
	white-space: nowrap;
}

.scu-grid__date,
.scu-grid__location {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--e-global-color-9bb1292, #696969);
}

/* Damage amount */
.scu-grid__damage {
	display: inline-flex;
	align-items: baseline;
	gap: 0.2rem;
	flex: 0 0 auto;
	white-space: nowrap;
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--e-global-color-text, #444444);
	margin-left: auto;
}

.scu-grid__empty {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 1rem;
	color: var(--e-global-color-9bb1292, #696969);
	padding: 2rem 0;
	text-align: center;
	grid-column: 1 / -1;
}

/* ── Loading state ─────────────────────────────────────────────────────────── */

.scu-grid-wrapper--loading {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .scu-search {
		display: flex;
		flex-direction: row;
		align-items: stretch; /* Makes both the input wrap and button stretch 100% */
	}
	
	.scu-search__field-wrap {
	    flex: 1 1 auto;
	    min-width: auto;
	}
	
	button.scu-btn {
		max-width: 90px; /* Ensures the button also spans full width when stacked */
	}
	
	button.scu-search__clear,
    button.scu-search__clear:hover,
    button.scu-search__clear:focus-visible {
	    right: 110px;
    }
}

@media (max-width: 1024px) {
	.scu-search {
		display: flex;
		flex-direction: row;
		align-items: stretch; /* Makes both the input wrap and button stretch 100% */
	}
	
	.scu-search__field-wrap {
	    flex: 1 1 auto;
	    min-width: auto;
	}
	
	button.scu-btn {
		max-width: 80px; /* Ensures the button also spans full width when stacked */
	}
	
	button.scu-search__clear,
    button.scu-search__clear:hover,
    button.scu-search__clear:focus-visible {
	    right: 95px;
    }
    
	.scu-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
    
	/* 1. Keep them in a row, but allow them to wrap to the next line when needed */
	.scu-filter-sort {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap; /* CRITICAL: Allows items to drop to a new line */
		gap: 4rem;      /* Even spacing between elements */
	}

	/* 2. When CLOSED, let them share the row equally or fit content */
	.scu-collapsible {
		flex: 1 1 auto;  /* Allows them to shrink/grow and sit side-by-side */
		width: auto;
	}
	
	/* 3. When OPEN, force that specific panel to take 100% width.
	   This pushes the other panel cleanly to the next line. */
	.scu-collapsible.scu-collapsible--open {
		flex: 0 0 100%;
		width: 100%;
	}
	
	/* Keep country grid clean on small screens */
	.scu-filter__tiles--countries {
		grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
	}

	/* 4. Keep Apply and Reset on the same horizontal line */
	.scu-filter__actions {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		gap: 1rem;
		width: 100%;
	}

	.scu-btn--apply, 
	.scu-btn--reset {
		flex: 1;
		text-align: center;
	}

	.scu-search {
		display: flex;
		flex-direction: row;
		align-items: stretch; /* Makes both the input wrap and button stretch 100% */
	}
	
	.scu-search__field-wrap {
	    flex: 1 1 auto;
	    min-width: auto;
	}
	
	button.scu-btn {
		max-width: 70px; /* Ensures the button also spans full width when stacked */
	}
	
	button.scu-search__clear,
    button.scu-search__clear:hover,
    button.scu-search__clear:focus-visible {
	    right: 85px;
    }
    
	.scu-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 550px) {
    
    .scu-grid {
		grid-template-columns: 1fr;
	}
}
/* ── Pagination pill ───────────────────────────────────────────────────────── */

/*
 * .scu-pagination-wrapper  — outer container; hidden when pages <= 1
 * .scu-pag                 — the dark pill (flex row)
 * .scu-pag__left           — arrows only; hidden when collapsed, slides in when expanded
 * .scu-pag__position       — "1 / 12"; always visible
 * .scu-pag__toggle         — chevron + total counter; always visible; toggles expand/collapse
 *
 * Collapsed:  left (arrows) hidden, position + toggle visible, toggle click expands
 * Expanded:   left (arrows) slides in, chevron flips up, toggle click collapses
 */

.scu-pagination-wrapper {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
}

.scu-pagination-wrapper[hidden] {
	display: none;
}

/* The pill */
.scu-pag {
	display: inline-flex;
	align-items: center;
	gap: 25px;
	background-color: var(--e-global-color-text, #444444);
	border-radius: 999px;
	padding: 0.375rem 0.75rem;
	user-select: none;
	-webkit-user-select: none;
	transition: background-color 0.15s ease;
	min-height: 2.5rem;
}

/* Arrows — hidden in collapsed state, visible when expanded */
button.scu-pag__arrow {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: none;
	padding: 0 0.2rem;
	cursor: pointer;
	font-size: 2.5rem;
	
	/* --- CRITICAL CHANGES FOR ALIGNMENT --- */
	line-height: 0;           /* Prevents text line-height from pushing the character down */
	display: inline-flex;     /* Keeps the button inline but allows flex alignment */
	align-items: center;      /* Vertically centers the glyph */
	justify-content: center;   /* Horizontally centers the glyph */
	height: 1.5rem;           /* Gives the button an explicit, consistent height matching the text */
	/* -------------------------------------- */

	color: var(--e-global-color-36221fb, #f2f2f2);
	transition: color 0.15s ease, opacity 0.15s ease;
	transform: translateY(-4px); /* Use -1px or -2px to nudge it up until it perfectly visually matches */
}

button.scu-pag__arrow:hover {
	color: var(--e-global-color-e4f6fd7, #1A66F8);
	background-color: transparent;
}

button.scu-pag__arrow:focus {
	background-color: transparent;
}

button.scu-pag__arrow--disabled {
	opacity: 0.3;
	cursor: default;
	pointer-events: none;
}

/* Arrows hidden in collapsed state */
.scu-pagination-wrapper:not(.scu-pagination--expanded) button.scu-pag__arrow {
	max-width: 0;
	opacity: 0;
	padding: 0;
	overflow: hidden;
	pointer-events: none;
	transition: max-width 0.2s ease, opacity 0.15s ease, padding 0.2s ease;
}

/* Arrows visible in expanded state — exclude disabled so opacity 0.3 is preserved */
.scu-pagination--expanded button.scu-pag__arrow:not(.scu-pag__arrow--disabled) {
	max-width: 2rem;
	opacity: 1;
	padding: 0 0.2rem;
	pointer-events: auto;
	transition: max-width 0.2s ease, opacity 0.15s ease, padding 0.2s ease;
}

.scu-pagination--expanded button.scu-pag__arrow--disabled {
	max-width: 2rem;
	opacity: 0.3;
	padding: 0 0.2rem;
	pointer-events: none;
	transition: max-width 0.2s ease, opacity 0.15s ease, padding 0.2s ease;
}

/* Page position "1 / 12" — always visible */
.scu-pag__position {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 1rem;
	font-weight: 600;
	color: var(--e-global-color-36221fb, #f2f2f2);
	white-space: nowrap;
	min-width: 3.25rem;
	text-align: center;
	
	/* Adjust this value to get the exact gap you want */
    word-spacing: 3px; 
    /* Optional: ensures the numbers themselves don't stretch, just the spaces */
    letter-spacing: 0.5px;
}

/* Toggle zone — chevron + total; always visible; cursor pointer */
.scu-pag__toggle {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 0 0.25rem 0 0.625rem;
	cursor: pointer;
	margin-left: 0.5rem;
}

.scu-pag__toggle:hover .scu-pag__chevron-icon {
	border-color: var(--e-global-color-e4f6fd7, #1A66F8);
}

/* CSS chevron icon — same technique as .scu-collapsible__icon */
.scu-pag__chevron-icon {
	display: inline-block;
	width: 0.8rem;
	height: 0.8rem;
	border-right: 2px solid var(--e-global-color-36221fb, #f2f2f2);
	border-bottom: 2px solid var(--e-global-color-36221fb, #f2f2f2);
	transform: rotate(45deg);   /* points down — collapsed state */
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

/* Expanded: chevron flips up */
.scu-pagination--expanded .scu-pag__chevron-icon {
	transform: rotate(-135deg);
}

/* Total cases count */
.scu-pag__total {
	font-family: var(--e-global-typography-b173076-font-family);
	font-size: 1rem;
	font-weight: 600;
	color: var(--e-global-color-36221fb, #f2f2f2);
	white-space: nowrap;
	/* Adjust this value to get the exact gap you want */
    word-spacing: 3px; 
    /* Optional: ensures the numbers themselves don't stretch, just the spaces */
    letter-spacing: 0.5px;
}
