/* Find Page Specific Styles */

/* Page title lives inside #delaware-district-lookup (same as former main > h1:first-child) */
.find-page #delaware-district-lookup > h1:first-child {
	margin-top: 0;
}

/* Side-by-side layout for address and district results (no-map version) */
#address-district-result {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.address-box, .district-box {
	background: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.address-box {
	border: 3px solid #245194;
	background-color: #fff;
}

.district-box {
	border: 3px solid #27ae60;
	background-color: #fff;
}

.address-box .result-content-header,
.district-box .result-content-header {
	margin: 0 0 15px 0;
	color: #2c3e50;
	font-size: 1.2em;
	border-bottom: 2px solid #ddd;
	padding-bottom: 8px;
}

.address-box .result-data-container,
.district-box .result-data-container {
	color: #555;
	line-height: 1.6;
}

/* Responsive design for no-map version */
@media (max-width: 768px) {
	#address-district-result {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.address-box, .district-box {
		padding: 15px;
	}
}

@media (max-width: 480px) {
	.address-box, .district-box {
		padding: 12px;
	}
	
	.address-box .result-content-header,
	.district-box .result-content-header {
		font-size: 1.1em;
	}
}

/* Two-pane container (matching boundaries page style) */
.find-page .two-pane-container {
	display: flex;
	gap: 20px;
	max-width: 1600px;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
}

.find-page .left-pane {
	flex: 0 0 calc(50% - 10px);
	background: white;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

.find-page .right-pane {
	flex: 0 0 calc(50% - 10px);
	background: white;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	overflow: hidden;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

/* District results in left pane */
.find-page .district-result {
	margin-top: 20px;
	padding: 20px;
	border-radius: 8px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

/* Full-width school results section */
.find-page .full-width-results {
	margin-top: 30px;
	width: 100%;
	max-width: 1600px;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

.find-page .school-result {
	padding: 20px;
	border-radius: 10px;
	background: white;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	border: none;
}

/* Loading/empty state message in school result */
.find-page .school-result .loading {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 200px;
	color: var(--color-text-muted);
	font-size: 1.1em;
	text-align: center;
	padding: 40px 20px;
}

/* School tiles grid layout */
.school-result .schools-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
	gap: 15px;
	margin-top: 15px;
}

/* Individual school tile */
.school-tile {
	padding: 15px;
	border-radius: 8px;
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	transition: all 0.2s ease;
}

.school-tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.school-tile .school-name {
	font-weight: bold;
	color: #2c3e50;
	margin-bottom: 8px;
	font-size: 1.1em;
}

.school-tile .school-details {
	font-size: 0.9em;
	color: var(--color-text-muted);
	margin-bottom: 8px;
}

.school-tile .school-address {
	font-size: 0.85em;
	color: var(--color-text-muted);
	margin-bottom: 10px;
	font-style: italic;
}

.school-tile .school-links {
	margin-top: 8px;
}

.school-tile .report-card-link {
	display: inline-block;
	background: #245194;
	color: white;
	padding: 6px 12px;
	text-decoration: none;
	border-radius: 4px;
	font-size: 0.85em;
	font-weight: 500;
	transition: background 0.2s ease;
}

.school-tile .report-card-link:hover {
	background: #1a3a6b;
	color: white;
	text-decoration: none;
}

/* Grade level badges */
.school-tile .school-grade {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 0.75em;
	font-weight: bold;
	margin-right: 8px;
	color: white;
}

/* Grade color coding */
.school-tile .grade-elementary { background: #4CAF50; }
.school-tile .grade-middle { background: #FF9800; }
.school-tile .grade-high { background: #F44336; }
.school-tile .grade-early-childhood { background: #9C27B0; }
.school-tile .grade-special { background: #607D8B; }
.school-tile .grade-admin { background: #795548; }

/* Tablet breakpoint: 2 columns */
@media (max-width: 1024px) {
	.school-result .schools-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
}

/* Mobile breakpoint: single column */
@media (max-width: 768px) {
	.school-result .schools-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
}

/* Autocomplete suggestions */
.autocomplete-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 5px 5px;
	max-height: 200px;
	overflow-y: auto;
	z-index: 1000;
	display: none;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-item {
	padding: 10px 12px;
	cursor: pointer;
	border-bottom: 1px solid #eee;
}

.suggestion-item:hover {
	background-color: #f8f9fa;
}

.suggestion-item:last-child {
	border-bottom: none;
}

.suggestion-item.selected {
	background-color: #e3f2fd;
}

/* "Use my location" action row inside the suggestions dropdown.
   Selector outweighs the global button[type="button"]:not([id]) rule in styles.css. */
.autocomplete-suggestions button.suggestion-action {
	display: block;
	width: 100%;
	padding: 10px 12px;
	border: none;
	border-top: 1px solid #eee;
	border-radius: 0 0 5px 5px;
	background-color: white;
	color: #245194;
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}

.autocomplete-suggestions button.suggestion-action:hover {
	background-color: #e3f2fd;
}

/* Address input wrapper (suggestions dropdown anchor) */
.address-input-wrap {
	position: relative;
}

/* Manual input */
.manual-input {
	background-color: #fff3cd;
	border: 1px solid #ffeaa7;
	padding: 15px;
	border-radius: 5px;
	margin: 20px 0;
	display: block;
}

.manual-input input {
	margin: 5px 0;
}

.toggle-manual {
	background: none;
	border: none;
	color: #007bff;
	text-decoration-line: underline;
	text-decoration-style: solid;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	cursor: pointer;
	padding: 0;
	font-size: 14px;
}

.toggle-manual:hover {
	color: #0056b3;
}

/* Grade Checkbox Styles */
.grade-checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 10px 0;
}

.clear-btn {
	background-color: #6c757d;
	color: white;
	padding: 8px 16px;
	border: none;
	border-radius: 5px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.clear-btn:hover {
	background-color: #5a6268;
}

.clear-btn:active {
	background-color: #495057;
}

/* School year picker bar (between grades and submit) */
.year-picker-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 5px;
	padding: 10px 12px;
}

.year-picker-bar label {
	margin: 0;
	font-weight: normal;
}

.year-picker-bar select {
	font-family: inherit;
	font-size: 14px;
	padding: 6px 10px;
	border: 1px solid #bdc3c7;
	border-radius: 5px;
	background-color: #fff;
	color: #2c3e50;
	cursor: pointer;
}

/* Grade School Result Styles */
.grade-school-result {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 15px;
	margin: 10px 0;
}

.grade-school-result h5 {
	color: #495057;
	margin: 0 0 10px 0;
	font-size: 16px;
	border-bottom: 2px solid #007bff;
	padding-bottom: 5px;
}

/* District Map Styling */
.find-page .district-map {
	margin-top: 0;
	padding: 0;
	background: transparent;
	border-radius: 0;
	border: none;
	height: 100%;
	min-height: 600px;
	display: flex;
	flex-direction: column;
}

.district-map h3 {
	font-family: Domine, serif;
	margin-top: 0;
	margin-bottom: 15px;
	color: #2c3e50;
}

#map {
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Toggle manual input / use-location button - style as subtle clickable button */
.help-text button#toggleManualBtn,
#toggleManualBtn,
.help-text button#useLocationLink,
#useLocationLink {
	background: #f8f9fa !important;
	border: 1px solid #dee2e6 !important;
	color: #245194 !important;
	text-decoration: none !important;
	cursor: pointer !important;
	padding: 8px 8px !important;
	margin: 4px !important;
	font-size: 14px !important;
	font-weight: 600;
	width: 100% !important;
	height: auto !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 0.35em !important;
	visibility: visible !important;
	opacity: 1 !important;
	border-radius: 3px !important;
	transition: all 0.2s ease !important;
}

.location-pin-icon-wrap {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
}

.location-pin-icon {
	display: block;
}

.help-text button#toggleManualBtn:hover,
#toggleManualBtn:hover,
.help-text button#useLocationLink:hover,
#useLocationLink:hover {
	color: #1a3a6b !important;
	background: #e9ecef !important;
	border-color: #adb5bd !important;
	text-decoration: none !important;
}

#useLocationLink:disabled {
	cursor: wait !important;
	color: #6c757d !important;
}

/* Zoom to Schools Button */
.zoom-to-schools-btn {
	background: #3498db;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 5px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'DM Sans', sans-serif;
}

.zoom-to-schools-btn:hover {
	background: #2980b9;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.zoom-to-schools-btn:active {
	transform: translateY(0);
}

/* District Action Buttons Container */
.district-action-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	align-items: center;
}

.registration-link {
	background: #28a745 !important;
}

.registration-link:hover {
	background: #218838 !important;
}

/* Responsive design for two-pane layout */
@media (max-width: 1300px) {
	.find-page .two-pane-container {
		flex-direction: column;
	}
	
	.find-page .left-pane,
	.find-page .right-pane {
		flex: 1 1 100%;
	}
	
	.find-page .district-map {
		min-height: 400px;
	}
	
	.full-width-results {
		margin-top: 20px;
	}
}

/* Tablet breakpoint */
@media (max-width: 768px) {
	.find-page .two-pane-container {
		gap: 15px;
	}
	
	.find-page .district-map {
		min-height: 350px;
	}
}

