/**
 * Full-screen overlay + panel: 100 Rujus list (who-are-the-rujus-in-madhwa-philosophy).
 * Uses a div overlay with the hidden attribute - not native <dialog> - for reliable hiding across themes.
 */

.ruju-hundred-preview {
	margin: 0.75em 0 1em;
	padding-left: 1.25rem;
}

.ruju-hundred-cta {
	margin: 1.25em 0;
}

.ruju-hundred-open {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	margin-left: 0.25em;
	padding: 0.45em 0.9em;
	font: inherit;
	font-weight: 600;
	line-height: 1.3;
	color: #1a3a2f;
	background: linear-gradient(180deg, #f4f8f2 0%, #e2ebe0 100%);
	border: 1px solid rgba(26, 58, 47, 0.25);
	border-radius: 6px;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ruju-hundred-open:hover,
.ruju-hundred-open:focus-visible {
	background: linear-gradient(180deg, #eef4eb 0%, #d8e5d5 100%);
	border-color: rgba(26, 58, 47, 0.4);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	outline: none;
}

.ruju-hundred-open:focus-visible {
	box-shadow: 0 0 0 3px rgba(46, 125, 95, 0.35);
}

/* Closed until opened (class-based - survives wp_kses better than the hidden attribute) */
.ruju-hundred-overlay.ruju-hundred-overlay--is-closed {
	display: none !important;
	visibility: hidden;
	pointer-events: none;
}

.ruju-hundred-overlay:not(.ruju-hundred-overlay--is-closed) {
	display: flex !important;
	visibility: visible;
	pointer-events: auto;
	position: fixed;
	z-index: 100050;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.ruju-hundred-overlay__scrim {
	position: absolute;
	inset: 0;
	background: rgba(15, 25, 22, 0.55);
	backdrop-filter: blur(2px);
}

.ruju-hundred-overlay__panel {
	position: relative;
	z-index: 1;
	width: min(100% - 2rem, 40rem);
	max-height: min(85vh, 40rem);
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
	background: #fdfdfb;
	color: #1e1e1e;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	min-height: 0;
}

.ruju-hundred-dialog__inner {
	padding: 1.25rem 1.35rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex: 1 1 auto;
	min-height: 0;
	box-sizing: border-box;
}

.ruju-hundred-dialog__inner h3 {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.35;
	color: #142a22;
}

.ruju-hundred-dialog__note {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: #3d4a44;
}

.ruju-hundred-list {
	margin: 0;
	padding-left: 1.35rem;
	overflow: auto;
	flex: 1 1 auto;
	min-height: 0;
	max-height: min(58vh, 28rem);
	font-size: 0.95rem;
	line-height: 1.45;
	column-width: 12rem;
	column-gap: 1.5rem;
}

.ruju-hundred-list li {
	break-inside: avoid;
	padding-bottom: 0.2em;
}

.ruju-hundred-dialog__close {
	align-self: flex-start;
	margin-top: 0.25rem;
	padding: 0.5em 1.15em;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	border-radius: 6px;
	border: 1px solid rgba(26, 58, 47, 0.3);
	background: #fff;
	color: #1a3a2f;
}

.ruju-hundred-dialog__close:hover,
.ruju-hundred-dialog__close:focus-visible {
	background: #f0f4f2;
	outline: none;
}

.ruju-hundred-dialog__close:focus-visible {
	box-shadow: 0 0 0 3px rgba(46, 125, 95, 0.35);
}

@media (max-width: 600px) {
	.ruju-hundred-list {
		column-width: auto;
		max-height: min(65vh, 26rem);
	}
}
