/* FFL Manager — public styles. Plain, theme-friendly. */

.fflmgr-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
}
.fflmgr-modal.is-open {
	display: block;
}
.fflmgr-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.5 );
}
.fflmgr-modal__panel {
	position: relative;
	width: min( 720px, 92vw );
	max-height: 90vh;
	margin: 4vh auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba( 0, 0, 0, 0.25 );
	padding: 1.25rem 1.25rem 1rem;
	overflow: auto;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}
.fflmgr-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	background: transparent;
	border: 0;
	font-size: 1.4rem;
	cursor: pointer;
	line-height: 1;
}
.fflmgr-modal__title {
	margin: 0;
	font-size: 1.25rem;
}
.fflmgr-modal__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}
.fflmgr-input {
	padding: 0.4rem 0.5rem;
	border: 1px solid #c0c0c0;
	border-radius: 4px;
	font-size: 0.95rem;
}
.fflmgr-input--zip   { width: 100px; }
.fflmgr-input--city  { flex: 1 1 180px; }
.fflmgr-input--state { width: 90px; text-transform: uppercase; }
.fflmgr-input--radius { width: 90px; }
.fflmgr-btn { white-space: nowrap; }

.fflmgr-modal__split {
	display: flex;
	gap: 1rem;
}
.fflmgr-modal__results { flex: 1 1 50%; min-width: 0; }
.fflmgr-modal__map {
	flex: 1 1 50%;
	/* min-width:0 lets this flex item shrink to its 50% basis. Without it the
	   default min-width:auto keeps the item at its content's min width — once
	   Google Maps loads real tiles that content is very wide, so the map blows
	   past the modal (the "map escaping its section" bug). overflow:hidden +
	   max-width:100% are belt-and-suspenders against a theme that doesn't clip. */
	min-width: 0;
	max-width: 100%;
	min-height: 320px;
	overflow: hidden;
	border: 1px solid #e3e3e3;
	border-radius: 4px;
	background: #f4f6f8;
}
.fflmgr-modal__map.is-empty { display: none; }
@media ( max-width: 720px ) {
	.fflmgr-modal__split { flex-direction: column; }
	.fflmgr-modal__map { min-height: 200px; order: 2; }
	.fflmgr-modal__results { order: 1; }
}

.fflmgr-results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.fflmgr-result {
	display: flex;
	gap: 0.75rem;
	justify-content: space-between;
	align-items: flex-start;
	padding: 0.6rem 0.75rem;
	border: 1px solid #e3e3e3;
	border-radius: 4px;
	background: #fafafa;
}
.fflmgr-result__main {
	flex: 1 1 auto;
}
.fflmgr-result__select {
	flex: 0 0 auto;
}
.fflmgr-result__dba {
	color: #666;
	font-style: italic;
}

.fflmgr-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.75rem;
	padding-top: 0.5rem;
	border-top: 1px solid #eee;
}
.fflmgr-pagination__status {
	font-size: 0.85rem;
	color: #555;
}
.fflmgr-pagination .button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.fflmgr-checkout-panel {
	border: 1px solid #e3e3e3;
	border-radius: 6px;
	padding: 1rem;
	margin-bottom: 1.5rem;
	background: #fcfcfc;
}
.fflmgr-checkout-panel h3 { margin-top: 0; }
.fflmgr-checkout-panel__license {
	display: inline-block;
	margin-left: 0.5rem;
	padding: 0.1rem 0.4rem;
	background: #efefef;
	border-radius: 3px;
	font-family: monospace;
}

.fflmgr-myaccount-tab {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.fflmgr-myaccount-card {
	border: 1px solid #e3e3e3;
	border-radius: 6px;
	padding: 1rem;
	background: #fafafa;
}

.fflmgr-registration-picker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

body.fflmgr-modal-open {
	overflow: hidden;
}
