/* Artisan Global Market - base styles.
   Deliberately simple: the theme (Astra) handles the visual identity,
   this file just keeps the plugin's blocks readable. */

.agm-form-wrapper {
	max-width: 600px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.agm-form p {
	margin-bottom: 1rem;
}

.agm-location-field {
	position: relative;
	margin-bottom: 1rem;
}

.agm-form input[type="text"],
.agm-form textarea,
.agm-form select {
	width: 100%;
	padding: 0.5rem;
	box-sizing: border-box;
}

.agm-form select:disabled {
	background: #f5f5f5;
	color: #999;
}

.agm-success {
	background: #eafaf1;
	border: 1px solid #2ecc71;
	padding: 0.75rem 1rem;
	border-radius: 4px;
}

.agm-error {
	background: #fdecea;
	border: 1px solid #d63638;
	color: #a3222a;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	font-size: 0.9rem;
}

.agm-field-note {
	display: block;
	font-size: 0.8rem;
	color: #888;
	margin: 0.3rem 0;
}

.agm-photo-field {
	margin-bottom: 1rem;
}

.agm-current-photos,
.agm-photo-preview {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.5rem 0;
}

.agm-current-photos img,
.agm-photo-preview img {
	width: 90px;
	height: 90px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #ddd;
}

.agm-photo-thumb {
	position: relative;
	display: inline-block;
}

.agm-photo-remove {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #d63638;
	color: #fff;
	border: 2px solid #fff;
	font-size: 13px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.agm-photo-remove:hover {
	background: #a3222a;
}

.agm-dashboard-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
}

.agm-dashboard-table th,
.agm-dashboard-table td {
	text-align: left;
	padding: 0.6rem;
	border-bottom: 1px solid #e0e0e0;
}

.agm-status-publish {
	color: #2ecc71;
	font-weight: 600;
}

.agm-status-draft {
	color: #999;
	font-weight: 600;
}

.agm-dashboard-photo img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.agm-dashboard-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	background: #f2f2f2;
	color: #bbb;
	border-radius: 4px;
}

.agm-listing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.5rem;
	margin-top: 1rem;
}

.agm-listing-card {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 1rem;
}

.agm-listing-card img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	margin-bottom: 0.5rem;
}

.agm-listing-location {
	color: #666;
	font-size: 0.9rem;
}

.agm-badge-professional {
	display: inline-block;
	background: #fdf0d5;
	color: #b8860b;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	padding: 0.15rem 0.5rem;
	border-radius: 3px;
	margin-bottom: 0.4rem;
}

.agm-listing-company {
	font-weight: 600;
	color: #2271b1;
	font-size: 0.9rem;
	margin: 0.2rem 0;
}

.agm-search-bar {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	align-items: stretch;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 50px;
	padding: 0.4rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.agm-search-field {
	position: relative;
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0.3rem 1rem;
	border-right: 1px solid #eee;
	min-width: 0;
}

.agm-search-field:last-of-type {
	border-right: none;
}

.agm-search-field label {
	font-size: 0.72rem;
	font-weight: 600;
	color: #666;
	margin-bottom: 0.2rem;
}

.agm-search-field input,
.agm-search-field select {
	border: none;
	outline: none;
	font-size: 0.9rem;
	padding: 0;
	background: transparent;
	width: 100%;
}

.agm-search-submit {
	flex: 0 0 auto;
	align-self: center;
	margin-left: 0.4rem;
	padding: 0.75rem 1.75rem;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 50px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.agm-search-submit:hover {
	background: #195a8f;
}

.agm-location-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	right: -1rem;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	margin: 0.4rem 0 0 0;
	padding: 0.3rem 0;
	list-style: none;
	max-height: 240px;
	overflow-y: auto;
	z-index: 9999;
	text-align: left;
}

.agm-location-suggestions li {
	padding: 0.5rem 0.9rem;
	font-size: 0.85rem;
	color: #333;
	cursor: pointer;
}

.agm-location-suggestions li:hover {
	background: #f2f6fa;
}

/* Stack the fields on smaller screens - a single row doesn't fit on mobile. */
@media (max-width: 720px) {
	.agm-search-bar {
		flex-wrap: wrap;
		border-radius: 12px;
	}
	.agm-search-field {
		flex: 1 1 100%;
		border-right: none;
		border-bottom: 1px solid #eee;
		padding: 0.6rem 0.8rem;
	}
	.agm-search-submit {
		flex: 1 1 100%;
		margin: 0.5rem 0.4rem 0.2rem 0.4rem;
	}
}

.agm-search-summary {
	margin-bottom: 1rem;
	font-size: 0.9rem;
	color: #666;
}

.agm-search-summary a {
	margin-left: 0.5rem;
}
