/* ==========================================================================
   Conduit Agent Locator — Public Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wrapper
   -------------------------------------------------------------------------- */
.cal-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: #333;
	max-width: 1100px;
	margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.cal-header {
	background: #006325;
	color: #fff;
	padding: 28px 32px;
	/* border-radius: 4px 4px 0 0;*/
}

.cal-title {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 700;
	color: #fff;
	letter-spacing: 0.3px;
}

.cal-subtitle {
	margin: 0;
	font-size: 14px;
	opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Search Section
   -------------------------------------------------------------------------- */
.cal-search-section { 
	border-top: none;
	padding: 24px 32px;
	background-color: inherit;
}

.cal-form-row {
	display: flex;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 16px;
}

.cal-form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cal-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #555;
}

.cal-input,
.cal-select {
	padding: 9px 12px;
	font-size: 15px;
	border: 1px solid #a0a0a0;
	 
	background: #fff;
	color: #333;
	transition: border-color 0.15s, box-shadow 0.15s;
	min-width: 160px;
}

.cal-input:focus,
.cal-select:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.25);
}

.cal-input {
	width: 140px;
}

.cal-select {
	width: 200px;
	cursor: pointer;
}

/* OR divider */
.cal-form-divider {
	display: flex;
	align-items: center;
	padding-bottom: 2px;
}

.cal-form-divider span {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 1px;
	color: #888;
	background: #f4f7fb;
	padding: 0 6px;
}

/* Actions */
.cal-form-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 2px;
}

.cal-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 22px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	/* border-radius: 4px; */
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
	white-space: nowrap;
}

.cal-btn--primary {
	background: #fff;
	color: #006325;
	border: 1px solid #006325;
}

.cal-btn--primary:hover {
	background: #006325;
	color: #fff;
	outline: none;
}

.cal-btn--secondary {
	background: #e2e8f0;
	color: #444;
}

.cal-btn--secondary:hover {
	background: #cdd5e0;
	outline: none;
}

.cal-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Map Section
   -------------------------------------------------------------------------- */
.cal-map-section {
	border: 1px solid #dce3ed;
	border-top: none;
	overflow: hidden;
}

#cal-map {
	width: 100%;
	height: 480px;
	transition: height 0.25s ease-in-out;
}

@media ( max-width: 1024px ) {
	#cal-map {
		height: 420px;
	}
}

/* --------------------------------------------------------------------------
   Results Section
   -------------------------------------------------------------------------- */
.cal-results-section {
	border: 1px solid #dce3ed;
	border-top: none;
	padding: 0;
}

.cal-results-section[hidden] {
	display: none;
}

/* Loading indicator */
.cal-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 40px 32px;
	padding-bottom: 0;
	color: #555;
	font-size: 14px;
	text-align: center;
}

.cal-loading[hidden] {
	display: none;
}

.cal-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 3px solid #d0d9e8;
	border-top-color: #006325;
	border-radius: 50%;
	animation: cal-spin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes cal-spin {
	to { transform: rotate(360deg); }
}

/* Results header (count line) */
.cal-results-header {
	padding: 14px 32px;
	background: #D9E8E2;
	border-bottom: 1px solid #dce3ed;
	font-size: 13px;
	color: #000;
	font-weight: 600;
}

.cal-results-header[hidden] {
	display: none;
}

/* Agents list */
.cal-agents-list {
	padding: 24px 32px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
}

/* Agent Card */
.cal-agent-card {
	background: #fff;
	border: 1px solid #a0a0a0; 
	padding: 20px 22px;  
}

.cal-agent-card:hover { 
}

.cal-agent-name {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 700;
	color: #006325;
	line-height: 1.3;
}

.cal-agent-details {
	font-size: 13.5px;
	color: #444;
}

.cal-agent-details p {
	margin: 0 0 7px;
}

.cal-agent-details p:last-child {
	margin-bottom: 0;
}

.cal-label-inline {
	font-weight: 700;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #888;
	margin-right: 4px;
}

.cal-states-covered {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 4px;
}

.cal-badge {
	display: inline-block;
	background: #e6f0e6;
	color: #006325;
	border: 1px solid #42634e; 
	padding: 1px 7px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.4px;
}

.cal-website-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #006325;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px; 
	transition: color 0.15s;
}

.cal-website-link:hover {
	color: #254f7d; 
}

/* Messages */
.cal-no-results,
.cal-error-msg {
	grid-column: 1 / -1;
	padding: 20px;
	text-align: center;
	border-radius: 4px;
	font-size: 14px;
}

.cal-no-results {
	background: #fef9e7;
	border: 1px solid #f0ad00;
	color: #7a5600;
}

.cal-error-msg {
	background: #fef2f2;
	border: 1px solid #f5c6c6;
	color: #8b1c1c;
}

/* --------------------------------------------------------------------------
   Info Window (Google Maps)
   -------------------------------------------------------------------------- */
.cal-info-window {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 13px;
	line-height: 1.5;
	max-width: 240px;
	min-height: 80px;
}

.cal-info-window p {
	margin: 0 0 2px;
}

.cal-info-window__title {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	color: #006325;
	margin-bottom: 4px !important;
}

.cal-info-window__address {
	color: #444;
	padding-right: 16px;
	margin-bottom: 6px !important;
}

.cal-info-window__label {
	font-weight: 600;
	color: #333;
}

.cal-info-window__states {
	color: #666;
	font-size: 12px;
	margin-top: 4px !important;
}

.cal-info-window a {
	color: #2271b1;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media ( max-width: 640px ) {
	.cal-header {
		padding: 20px 18px;
	}

	.cal-search-section {
		padding: 18px;
	}

	.cal-form-row {
		flex-direction: column;
		align-items: stretch;
	}

	.cal-form-divider {
		display: none;
	}

	.cal-input,
	.cal-select {
		width: 100%;
		min-width: unset;
		box-sizing: border-box;
	}

	.cal-form-actions {
		flex-direction: column;
	}

	.cal-btn {
		width: 100%;
	}

	.cal-agents-list {
		padding: 16px;
		grid-template-columns: 1fr;
	}

	.cal-results-header {
		padding: 12px 16px;
	}

	#cal-map {
		height: 280px;
	}
}

/* --------------------------------------------------------------------------
   Validation Modal
   -------------------------------------------------------------------------- */
.cal-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cal-modal[hidden] {
	display: none;
}

.cal-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.45 );
	cursor: pointer;
}

.cal-modal-box {
	position: relative;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.25 );
	padding: 32px 28px 24px;
	max-width: 400px;
	width: 90%;
	text-align: center;
	z-index: 1;
}

.cal-modal-msg {
	margin: 0 0 20px;
	font-size: 15px;
	color: #333;
	line-height: 1.55;
}

.cal-modal-close {
	min-width: 110px;
}
