/* =========================================================
   Easy A-Z — Front-end styles v1.1.0
   Colours are driven by shortcode attributes (inline styles).
   This file handles layout, spacing and structural rules only.
   ========================================================= */

/* ----- Wrapper ----- */
.easy-az-wrap {
	width: 100%;
}

/* ----- Search box ----- */
.easy-az-search-wrap {
	margin-bottom: 1.5em;
}

.easy-az-search {
	display: block;
	width: 100%;
	max-width: 480px;
	padding: 0.55em 0.9em;
	font-size: 1rem;
	font-family: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	outline: none;
	transition: opacity 0.2s ease;
	box-sizing: border-box;
	opacity: 0.7;
}

.easy-az-search:focus {
	opacity: 1;
}

/* ----- Jump-to-letter nav ----- */
.easy-az-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 1.5em;
}

.easy-az-nav__letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	font-size: 0.85rem;
	font-weight: 700;
	font-family: inherit;
	/* colour set via inline style from shortcode */
	border: 1px solid currentColor;
	border-radius: 4px;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	line-height: 1;
}

.easy-az-nav__letter:hover,
.easy-az-nav__letter:focus {
	text-decoration: none;
	/* bg/color swap handled by scoped inline style in shortcode */
}

/* Nav letter dimmed when group has no visible results during search */
.easy-az-nav__letter.eaz-hidden {
	opacity: 0.25;
	pointer-events: none;
}

/* ----- Directory grid ----- */
.easy-az-directory {
	display: grid;
	grid-template-columns: repeat( var(--eaz-columns, 3), 1fr );
	gap: 1.75em 1.25em;
	align-items: start;
}

/* ----- Letter group ----- */
.easy-az-group__heading {
	font-family: inherit;
	font-size: 1.4rem;
	font-weight: 700;
	/* color set via scoped inline style */
	margin: 0 0 0.5em 0;
	padding-bottom: 0.35em;
	border-bottom: 2px solid currentColor;
	/* border-bottom-color overridden by scoped inline style */
	line-height: 1.2;
}

/* ----- Location list ----- */
.easy-az-group__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.easy-az-item {
	margin: 0;
	padding: 0.18em 0;
}

.easy-az-item a {
	/* color set via scoped inline style */
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.15s ease;
}

.easy-az-item a:hover,
.easy-az-item a:focus {
	text-decoration: underline;
}

/* Highlight matching search text */
.easy-az-item a mark {
	background: rgba(0,0,0,0.1);
	color: inherit;
	border-radius: 2px;
}

/* Hidden items during search */
.easy-az-item.eaz-hidden {
	display: none;
}

/* Hidden groups during search */
.easy-az-group.eaz-group-hidden {
	display: none;
}

/* ----- No results message ----- */
.easy-az-no-results {
	font-size: 1rem;
	opacity: 0.6;
	padding: 1em 0;
	margin: 0;
}

/* ----- Responsive breakpoints ----- */
@media ( max-width: 900px ) {
	.easy-az-directory {
		grid-template-columns: repeat( 2, 1fr ) !important;
	}
}

@media ( max-width: 560px ) {
	.easy-az-directory {
		grid-template-columns: 1fr !important;
	}
	.easy-az-search {
		max-width: 100%;
	}
}

/* ----- Empty state ----- */
.easy-az-empty {
	opacity: 0.6;
	font-size: 1rem;
}
