/**
 * Library Search Block Styles
 */

/* Non-stacked columns - add margin to right column */
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:first-child) {
	margin: 2rem !important;
}

/* Columns Block with Chapel Blue Background */
.wp-block-columns:has(.library-search-block) {
	background: #004159;
	padding: 0rem;
}

/* Search Block Container */
.library-search-block {
	background: transparent;
	padding: 1.5rem 0;
	text-align: center;
}

.library-search-wrapper {
	background: transparent;
	padding: 0;
	border-radius: 0;
	box-shadow: none;
}

.library-search-container {
	max-width: 100%;
}

.library-search-title {
	color: white;
	font-family: "GT America", sans-serif;
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 1rem 0;
	letter-spacing: -0.5px;
}

/* Search Form */
.pml-search-form {
	margin: 0;
}

.search-input-wrapper {
	display: flex;
	gap: 0.75rem;
	justify-content: center;
	align-items: center;
}

.pml-search-input {
	flex: 1;
	max-width: 450px;
	padding: 0.75rem 1rem;
	font-family: "GT America", sans-serif;
	font-size: 1rem;
	border: 1px solid #ddd;
	border-radius: 0;
	background: white;
	color: #333;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: all 0.2s ease;
}

.pml-search-input:focus {
	outline: none;
	border-color: #333;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.pml-search-input::placeholder {
	color: #999;
}

.pml-search-button {
	padding: 0.75rem 1.75rem;
	background: #000;
	color: white;
	border: none;
	border-radius: 0;
	font-family: "GT America Bold", sans-serif;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	text-transform: uppercase;
}

.pml-search-button:hover {
	background: #222;
}

.pml-search-button:active {
	transform: scale(0.98);
}

.pml-search-button:focus {
	outline: 2px solid #333;
	outline-offset: 2px;
}

/* Loading Spinner */
.search-spinner {
	display: inline-block;
	width: 1.2rem;
	height: 1.2rem;
	margin-left: 0.75rem;
	vertical-align: middle;
	visibility: hidden;
}

.spinner {
	animation: spin 1s linear infinite;
	width: 100%;
	height: 100%;
}

.spinner .path {
	stroke: white;
	stroke-linecap: round;
	animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
	100% { transform: rotate(360deg); }
}

@keyframes dash {
	0% {
		stroke-dasharray: 1, 150;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -35;
	}
	100% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -124;
	}
}

/* Quick Links */
.search-quick-links {
	margin-top: 0.75rem;
	margin-left: auto;
	margin-right: auto;
	padding-top: 0;
	border-top: none;
	display: flex;
	justify-content: flex-start;
	gap: .5rem;
	flex-wrap: wrap;
	width: 550px;
}

.search-quick-links a {
	color: white;
	text-decoration: underline;
	font-family: "GT America", sans-serif;
	font-size: 0.75rem;
	transition: color 0.2s ease;
}

.search-quick-links a:hover {
	color: #ccc;
}

.search-quick-links a:focus {
	outline: 2px solid white;
	outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.library-search-block {
		padding: 2.5rem 1.5rem;
	}

	.library-search-wrapper {
		padding: 2rem 1.5rem;
	}

	.library-search-title {
		font-size: 1.75rem;
		margin-bottom: 1.5rem;
	}

	.search-input-wrapper {
		flex-direction: column;
		gap: 0.5rem;
	}

	.pml-search-input {
		max-width: 100%;
		padding: 0.875rem 1rem;
		font-size: 1rem;
	}

	.pml-search-button {
		padding: 0.875rem 1.5rem;
	}
}

@media (max-width: 480px) {
	.library-search-block {
		padding: 2rem 1rem;
	}

	.library-search-wrapper {
		padding: 1.5rem 1rem;
	}

	.library-search-title {
		font-size: 1.5rem;
		margin-bottom: 1rem;
	}

	.pml-search-input {
		font-size: 16px; /* Prevents zoom on iOS */
	}
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
	.library-search-wrapper {
		background: #1a1a1a;
	}

	.library-search-title {
		color: white;
	}

	.pml-search-input {
		background: #2a2a2a;
		color: white;
		border-color: #444;
	}

	.pml-search-input::placeholder {
		color: #aaa;
	}

	.pml-search-input:focus {
		border-color: white;
	}
}