/**
 * @file
 * Front-end styles for the IDX blocks.
 *
 * Uses theme CSS custom properties for color consistency with the reco theme.
 * Ported from assets/css/style.css in the flexmls-idx WordPress plugin.
 */

/* Widget containers */
.flexmls-v2-widget {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}

.flexmls-v2-widget h3 {
  margin: 0 0 0.75em;
  font-size: 1.2em;
}

/* Search form */
.flexmls-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.flexmls-search-form.flexmls-orientation-vertical {
  flex-direction: column;
}

.flexmls-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}

.flexmls-field-group label {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--color-text-dark, #333);
}

.flexmls-field-group input,
.flexmls-field-group select,
.flexmls-field-group textarea {
  padding: 8px 10px;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 4px;
  font-size: 0.9em;
  width: 100%;
  box-sizing: border-box;
}

.flexmls-field-group input:focus,
.flexmls-field-group select:focus {
  border-color: var(--color-accent, #bfa37c);
  outline: none;
  box-shadow: 0 0 3px color-mix(in srgb, var(--color-accent, #bfa37c) 40%, transparent);
}

.flexmls-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85em;
  margin-right: 8px;
}

.flexmls-checkbox-label input[type="checkbox"] {
  width: auto;
}

.flexmls-submit-button {
  padding: 10px 24px;
  background: var(--color-accent, #bfa37c);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.95em;
  cursor: pointer;
  transition: background 0.2s;
}

.flexmls-submit-button:hover {
  background: var(--color-accent-dark, #a88b64);
}

/* Listing cards grid */
.flexmls-listings-list-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 16px 0;
}

/* No-photo placeholder */
.flexmls-no-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  background: var(--color-bg-alt, #f4f4f4);
  color: var(--color-text-light, #999);
  font-size: 14px;
}

.flexmls-listing-details {
  padding: 12px;
}

.flexmls-listing-price {
  font-size: 1.3em;
  font-weight: 700;
  color: var(--color-text-dark, #333);
}

.flexmls-listing-address {
  font-size: 0.9em;
  color: var(--color-text, #666);
  margin: 4px 0;
}

.flexmls-listing-meta {
  display: flex;
  gap: 12px;
  font-size: 0.85em;
  color: var(--color-text, #666);
  margin: 6px 0;
}

.flexmls-listing-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  background: #e0f2fe;
  color: #0369a1;
}

.flexmls-listing-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85em;
  color: var(--color-accent, #bfa37c);
  text-decoration: none;
}

.flexmls-listing-link:hover {
  text-decoration: underline;
}

/* Photo gallery */
.flexmls-photo-gallery {
  margin: 16px 0;
}

.flexmls-detail-main-photo {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.flexmls-photo-thumbnails {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.flexmls-thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.flexmls-thumbnail:hover {
  opacity: 1;
}

/* Key details metrics */
.flexmls-detail-key-details {
  display: flex;
  gap: 24px;
  margin: 16px 0;
  padding: 16px;
  background: var(--color-bg-alt, #f4f4f4);
  border-radius: 8px;
}

.flexmls-detail-metric {
  text-align: center;
}

.metric-value {
  display: block;
  font-size: 1.5em;
  font-weight: 700;
  color: var(--color-text-dark, #333);
}

.metric-label {
  display: block;
  font-size: 0.8em;
  color: var(--color-text, #666);
  text-transform: uppercase;
}

/* Photo carousel */
.flexmls-connect__photo_carousel_images {
  position: relative;
}

.flexmls-carousel-slide {
  display: flex;
  gap: 12px;
  overflow: hidden;
}

.flexmls-carousel-item {
  flex: 1;
  min-width: 0;
}

.flexmls-carousel-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
}

.flexmls-carousel-item-info {
  padding: 8px 0;
  font-size: 0.85em;
}

.flexmls-carousel-price {
  display: block;
  font-weight: 700;
  color: var(--color-text-dark, #333);
}

.flexmls-carousel-address {
  display: block;
  color: var(--color-text, #666);
  font-size: 0.9em;
}

.flexmls-carousel-meta {
  display: block;
  color: var(--color-text, #666);
  font-size: 0.85em;
}

.flexmls-carousel-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.flexmls-carousel-prev,
.flexmls-carousel-next {
  background: var(--color-accent, #bfa37c);
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pagination */
.flexmls-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border, #e2e2e2);
}

.flexmls-pagination a {
  color: var(--color-accent, #bfa37c);
  text-decoration: none;
}

.flexmls-pagination a:hover,
.flexmls-pagination a:focus
 {
  text-decoration: underline;
}

.flexmls-page-current {
  font-weight: 700;
  color: var(--color-text, #666);
}

.flexmls-page-info {
  color: var(--color-text, #666);
  font-size: 0.9em;
}

/* Lead gen form */
.flexmls-lead-gen-form {
  max-width: 500px;
}

.flexmls-lead-gen-form .flexmls-field-group {
  margin-bottom: 12px;
}

.flexmls-lead-gen-blurb {
  margin-bottom: 16px;
  color: var(--color-text, #666);
}

/* Location/Custom links */
.flexmls-location-links-list,
.flexmls-custom-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.flexmls-location-links-list li,
.flexmls-custom-links-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border, #e2e2e2);
}

.flexmls-location-links-list a,
.flexmls-custom-links-list a {
  color: var(--color-accent, #bfa37c);
  text-decoration: none;
}

.flexmls-location-links-list a:hover,
.flexmls-custom-links-list a:hover {
  text-decoration: underline;
}

/* Portal account */
.flexmls-portal-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.flexmls-portal-button-primary,
.flexmls-portal-button-secondary {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9em;
}

.flexmls-portal-button-primary {
  background: var(--color-accent, #bfa37c);
  color: #fff;
}

.flexmls-portal-button-secondary {
  background: var(--color-bg-alt, #f4f4f4);
  color: var(--color-text-dark, #333);
}

.flexmls-portal-button-primary:hover,
.flexmls-portal-button-secondary:hover {
  opacity: 0.9;
}

/* Disclaimer */
.flexmls-connect__disclaimer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border, #e2e2e2);
  color: var(--color-text-light, #999);
  font-size: 0.8em;
}

/* Neighborhood */
.flexmls-neighborhood-section {
  margin-bottom: 32px;
}

.flexmls-neighborhood-listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.flexmls-neighborhood-listing-card {
  border: 1px solid var(--color-border, #e2e2e2);
  border-radius: 6px;
  overflow: hidden;
}

.flexmls-neighborhood-listing-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.flexmls-neighborhood-listing-info {
  padding: 10px;
}

.flexmls-neighborhood-listing-info .flexmls-price {
  font-weight: 700;
  font-size: 1.1em;
}

.flexmls-neighborhood-listing-info .flexmls-address {
  font-size: 0.85em;
  color: var(--color-text, #666);
}

.flexmls-neighborhood-listing-info .flexmls-meta {
  font-size: 0.8em;
  color: var(--color-text, #666);
}

.flexmls-inline-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

/* Agent list */
.flexmls-agent-search form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.flexmls-agent-search input[type="text"] {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--color-border, #e2e2e2);
  border-radius: 4px;
}

/* Charts */
.flexmls-chart-container {
  position: relative;
}

/* ==========================================================================
   V2 Listing Detail Template Styles
   Ported from assets/css/style.css (flexmls-idx v3.18.2)
   ========================================================================== */

/* Font utilities */
.flexmls-heading-font { font-weight: 600; }
.flexmls-body-font { font-weight: 400; }
.flexmls-primary-color-font { color: var(--color-accent, #bfa37c); }
.flexmls-primary-color-background { background-color: var(--color-accent, #bfa37c); }
.flexmls-title-largest { font-size: 1.6em; margin: 0 0 0.25em; }
.flexmls-title-larger { font-size: 1.3em; margin: 1em 0 0.5em; }
.flexmls-title-large { font-size: 1.1em; margin: 0.75em 0 0.25em; }

/* Listing detail wrapper */
.flexmls-listing-details {
  max-width: 1200px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text, #666);
  line-height: 1.6;
}

.flexmls-listing-details .listing-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border, #e2e2e2);
}

/* Back to search + contact agent */
.flexmls-actions-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.back-to-search-link {
  text-decoration: none;
  font-size: 0.95em;
  color: var(--color-accent, #bfa37c);
}

.back-to-search-link:hover {
  text-decoration: underline;
}

.flexmls-btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  text-decoration: none;
  transition: opacity 0.2s;
}

.flexmls-btn:hover { opacity: 0.9; }
.flexmls-btn-primary {
  background: var(--color-accent, #bfa37c);
  color: #fff;
}
.flexmls-btn-secondary {
  background: var(--color-bg-alt, #f4f4f4);
  color: var(--color-text-dark, #333);
  border: 1px solid var(--color-border, #e2e2e2);
}
.flexmls-btn-sm { padding: 6px 14px; font-size: 0.85em; }

.flexmls-map-buttons {
  display: flex;
  margin-left: auto;
  margin-bottom: 2rem;
}

/* Title and price — single row, price on right */
.title-and-details-wrapper {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.title-and-status-wrapper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.property-title { margin: 0; padding-bottom: 0px !important; }
.new-listing-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--color-accent, #bfa37c);
  color: #fff;
}
.new-listing-tag.open-house { background: #f59e0b; }

.price-and-actions-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.flexmls-price { font-weight: 700; color: var(--color-text-dark, #333); }
.top-info-wrapper .flexmls-price { font-size: 1.5em; }

/* Slideshow */
.slideshow-wrapper { position: relative; }

.flexmls-slideshow .listing-image img,
.flexmls-slideshow .owl-lazy {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.listing-video iframe {
  width: 100%;
  max-height: 500px;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
}

.listing-vtour {
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 320px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.listing-vtour-card {
  background: rgba(255,255,255,0.92);
  padding: 24px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
}

.listing-vtour-card h3 { margin: 0 0 12px; }

/* Main details grid */
.flexmls-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.flexmls-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label { font-size: 0.8em; color: var(--color-text, #666); text-transform: uppercase; letter-spacing: 0.5px; }
.detail-value { font-size: 1.05em; color: var(--color-text-dark, #333); font-weight: 500; }

.price-and-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border, #e2e2e2);
}

/* Description */
.flexmls-description,
.flexmls-supplement { line-height: 1.7; color: var(--color-text, #666); }

.flexmls-description-read-more,
.flexmls-supplement-read-more {
  color: var(--color-accent, #bfa37c);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

/* Collapsible sections */
.flexmls-detail-section-toggle {
  border: 1px solid var(--color-border, #e2e2e2);
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
}

.flexmls-detail-section-header {
  margin: 0;
  padding: 12px 16px;
  font-size: 1em;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-alt, #f4f4f4);
  transition: background 0.2s;
}

.flexmls-detail-section-header:hover { background: #e8e8e8; }

.flexmls-detail-section-header::after {
  content: '\25BC';
  font-size: 0.7em;
  margin-left: auto;
  transition: transform 0.2s;
}

.flexmls-detail-section-collapsed .flexmls-detail-section-header::after {
  transform: rotate(-90deg);
}

.flexmls-detail-section-body { padding: 12px 16px; }

.flexmls-detail-section-collapsed .flexmls-detail-section-body {
  display: none;
}

.detail-subsection-header {
  margin-top: 2rem;
}

.field-pair {
  display: flex;
  gap: 4px 8px;
  align-items: baseline;
}

.field-pair .detail-label { 
  font-size: 0.85em; 
  white-space: nowrap;
}
.field-pair .detail-value { 
  font-size: 0.95em; 
}

/* Rooms table */
.flexmls-room-information-table-wrap { overflow-x: auto; }

.flexmls-room-information-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.flexmls-room-information-table th {
  background: var(--color-bg-alt, #f4f4f4);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--color-border, #e2e2e2);
}

.flexmls-room-information-table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--color-border, #e2e2e2);
}

.flexmls-room-row-zebra { background: #fafafa; }

/* Status badges */
.flexmls-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
}

.flexmls-status-active { background: #dcfce7; color: #15803d; }
.flexmls-status-pending { background: #fef3c7; color: #b45309; }
.flexmls-status-closed { background: #fee2e2; color: #b91c1c; }
.flexmls-status-coming-soon { background: #e0f2fe; color: #0369a1; }
.flexmls-status-active-under-contract { background: #fef3c7; color: #92400e; }

/* Open houses list */
.open-houses-list-details {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.open-house-item {
  padding: 6px 0;
  font-size: 0.95em;
}

/* Documents */
.flexmls-documents-wrapper a {
  display: block;
  padding: 6px 0;
  color: var(--color-accent, #bfa37c);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border, #e2e2e2);
}

.flexmls-documents-wrapper a:hover { text-decoration: underline; }

.fmc-doc-icon {
  padding-bottom: 6px;
}

/* Compliance section */
.flexmls-office-name,
.flexmls-agent-name { display: block; margin-bottom: 6px; font-size: 0.9em; }

.flexmls-bold-label { font-weight: 600; }

/* Compensation disclaimer */
.compensation-disclaimer {
  padding: 12px 16px;
  background: #fef9c3;
  border-radius: 4px;
  font-size: 0.9em;
  margin: 8px 0;
}

/* Disclosure text */
.disclosure-text { font-size: 0.85em; color: var(--color-text-light, #999); }

/* Listing cards in search results (V2 style) matching WP plugin v4 */
.flexmls_connect__sr_result,
.flexmls-listing {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-border, #e2e2e2);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  background: var(--color-bg, #fff);
  max-width: 480px;
}

.flexmls_connect__sr_result:hover,
.flexmls-listing:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.flexmls-listing.flexmls_connect__sr_result {
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Image area */
.flexmls-image-wrapper {
  position: relative;
  background-size: cover;
  background-position: center;
  background-color: var(--color-bg-alt, #f4f4f4);
  overflow: hidden;
}

.flexmls-image-wrapper .flexmls-listing-card__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 400;
  object-fit: cover;
}

.flexmls-image-wrapper .flexmls-listing-photo-link {
  display: block;
  line-height: 0;
}

/* New Listing tag overlay */
.flexmls-image-wrapper .new-listing-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-accent, #bfa37c);
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}

/* Price overlay on image */
.flexmls-image-wrapper .flexmls-price {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  font-size: 24px;
  font-weight: 700;
}

/* Portal action buttons (favorite/reject) overlay */
.flexmls-portal-links {
  position: absolute;
  top: 10px;
  right: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.flexmls-portal-links .listing_cart { display: flex; gap: 2px; }

.flexmls-portal-links .listing_cart span {
  cursor: pointer;
  color: #fff;
  font-size: 1.4em;
  padding: 0 0.25em;
}

.flexmls-portal-links .listing_cart .Favorites.selected i { color: #f9dd00; text-shadow: 0 0 1px rgba(0,0,0,0.5); }
.flexmls-portal-links .listing_cart .Rejects.selected i { color: #f50000; text-shadow: 0 0 3px rgba(0,0,0,0.1); }

/* Content area (linked) */
.flexmls-content-wrapper {
  display: block;
  text-decoration: none !important;
  color: inherit;
  padding: 16px;
}

.flexmls-content-wrapper .flexmls-address {
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-dark, #333);
}

.flexmls-content-wrapper .flexmls-quick-details {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--color-text, #666);
}

.flexmls-content-wrapper .flexmls-quick-details .flexmls-status {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flexmls-content-wrapper .flexmls-quick-details .flexmls-details {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flexmls-content-wrapper .flexmls-quick-details .flexmls-details span + span::before {
  content: ' | ';
  color: var(--color-border, #e2e2e2);
}

/* Status text colors (for search cards — background variants above) */
.flexmls-status-active,
.flexmls-status-active-under-contract,
.flexmls-status-coming-soon { color: #277c22; }
.flexmls-status-closed { color: var(--color-accent, #bfa37c); }
.flexmls-status-pending { color: #ef8c00; }
.flexmls-status-canceled,
.flexmls-status-deleted,
.flexmls-status-expired,
.flexmls-status-hold,
.flexmls-status-withdrawn { color: #737373; }

/* Last modified + IDX badge row */
.flexmls-last-modified-and-idx-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--color-border, #e2e2e2);
  font-size: 13px;
  color: var(--color-text, #666);
}

.flexmls-bold-label {
  font-weight: 700;
}

/* IDX compliance badge */
.flexmls-idx-compliance-label {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  border-radius: 6px;
  background-color: var(--color-primary, #000);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Icon font for portal stars — use a simple fallback via content */
.flexmls-icon-star-full::before { content: '\2605'; }
.flexmls-icon-blocked::before { content: '\2716'; }

/* Portal login buttons */
.flexmls-login-buttons { margin: 8px 0; }

/* Saved search button */
.saved-search-button { margin: 4px 0; display: inline-block; }

/* Matches count */
.flexmls-matches-count { font-size: 0.95em; color: var(--color-text, #666); }

.flexmls-filters-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.flexmls-filters-wrapper label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.85em;
  font-weight: 600;
  color: var(--color-text-dark, #333);
}

.flexmls-filters-wrapper .flexmls-sort-select,
.flexmls-filters-wrapper .listingsperpage {
  width: auto;
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--color-border, #ddd);
  border-radius: 4px;
  font-size: 0.9em;
}

.flexmls-filters-wrapper .listings-per-page-wrapper,
.flexmls-filters-wrapper .sort-by-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flexmls-count-and-filters-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

/* Agent tabs */
.flexmls-agent-search-tabs {
  display: flex;
  gap: 0;
  margin: 12px 0;
  border-bottom: 2px solid var(--color-border, #e2e2e2);
}

.flexmls-agent-search-tabs a {
  padding: 8px 20px;
  text-decoration: none;
  color: var(--color-text, #666);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.flexmls-agent-search-tabs a.active {
  color: var(--color-accent, #bfa37c);
  border-bottom-color: var(--color-accent, #bfa37c);
  font-weight: 600;
}

.flexmls-agent-search-tabs a:hover { color: var(--color-accent, #bfa37c); }

/* ---------------------------------------------------------------------------
   Map marker styles (port of WP plugin's flex-map-marker-* classes)
   --------------------------------------------------------------------------- */

.flexmls-google-map {
  width: 100%;
  height: 400px;
}

.flex-map-markerLabels {
  overflow: inherit !important;
}

.flex-map-marker-price {
  font-family: HelveticaNeue, 'Helvetica Neue', 'Work Sans', Helvetica, Arial, 'Lucida Grande', sans-serif;
  font-weight: 400;
  align-items: center;
  background-color: #fff;
  border-radius: 13px;
  border: 1px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  color: var(--color-accent, #bfa37c);
  display: flex;
  font-size: 13px;
  height: 27px;
  width: 80px;
  position: relative;
}

.flex-map-marker-price .arrow {
  position: absolute;
  left: 50%;
  bottom: -6px;
  margin-left: -5px;
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 6px 0;
  border-color: rgba(0, 0, 0, 0.1) transparent transparent;
}

.flex-map-marker-price .arrow:after {
  content: '';
  position: absolute;
  bottom: 1px;
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 6px 0;
  margin-left: -7px;
  border-color: #fff transparent transparent;
}

.flex-map-marker-icon {
  align-items: center;
  background-color: var(--color-accent, #bfa37c);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 24px;
  height: 25px;
  justify-content: center;
  width: 25px;
  flex-shrink: 0;
}

.flex-map-marker-content {
  display: inline-block;
  padding: 0 7px 0 5px;
  white-space: nowrap;
  font-weight: 600;
  color: var(--color-text-dark, #333);
}

/* Info window styles */
.flex-map-info {
  display: flex;
  gap: 10px;
  min-width: 220px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

.flex-map-info-photo {
  width: 100px;
  height: 100px;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  flex-shrink: 0;
}

.flex-map-info-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.flex-map-info-price {
  font-weight: 800;
  font-size: 1.2em;
}

.flex-map-info-address-1,
.flex-map-info-address-2 {
  color: var(--color-text, #666);
}

.flex-map-info-extra {
  margin-top: 4px;
  color: var(--color-text-dark, #333);
  font-weight: 500;
}

.flex-map-info-bedrooms,
.flex-map-info-bathrooms {
  margin-right: 8px;
}

.flex-map-info-link {
  margin-top: 4px;
}

.flex-map-info-link a {
  color: var(--color-accent, #bfa37c);
  text-decoration: none;
  font-weight: 600;
}

.flex-map-info-link a:hover {
  text-decoration: underline;
}

.flexmls-map-wrapper {
  padding-top: 1rem;
  margin: 2rem 0;
}

/* Clean circular pin for the listing detail map with house icon. */
.flexmls-detail-map-pin {
  width: 28px;
  height: 28px;
  background: #bfa37c;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
