/*
 * UTILITIES — Small reusable helper classes that Bootstrap does not provide.
 * Sections: fonts, brand colors & surfaces, minimum width, favorite button.
 * Prefer Bootstrap utilities for spacing, flex, grids, borders, and positioning.
 * Component-specific styles belong in layout.css.
 */

/* ==========================================================================
   FONT HELPERS — Body font
   ========================================================================== */

.font-body {
  font-family: var(--app-font-body);
}



/* ==========================================================================
   BRAND COLORS & SURFACES — Accent text and shared backgrounds
   ========================================================================== */

.text-accent {
  color: var(--color-burgundy);
}
.bg-surface {
  background-color: var(--lac-surface);
}
.bg-sand {
  background-color: var(--lac-sand);
}
.bg-feature {
  background-color: var(--color-burgundy);
}
.link-burgundy {
  color: var(--bs-link-color);
}
.link-burgundy:hover {
  color: var(--bs-link-hover-color);
}




/* ==========================================================================
   MINIMUM WIDTH — Allow content to shrink inside flex layouts
   ========================================================================== */

/* Bootstrap has no min-width: 0 utility. */
.min-w-0 {
  min-width: 0;
}

/* ==========================================================================
   FAVORITE BUTTON — Shared appearance for any content type.
   Edit size, shape, alignment, and icon size here. Neutral colors are in theme.css.
   Put position/offset/spacing classes on a wrapping div, not on the button.
   ========================================================================== */

.btn-favorite {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;










}
.btn-favorite[aria-pressed="true"] { color: var(--color-burgundy); background: var(--color-light-gray); }

/* Authoritative saved state applies on render and after successful AJAX changes.
   Bootstrap variables preserve its normal focus, hover and disabled behavior. */
[data-listing-bookmark-form] .btn[aria-pressed="true"],
.btn-favorite[aria-pressed="true"] {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--color-burgundy);
  --bs-btn-border-color: var(--color-burgundy);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--color-burgundy);
  --bs-btn-hover-border-color: var(--color-burgundy);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--color-burgundy);
  --bs-btn-active-border-color: var(--color-burgundy);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--color-burgundy);
  --bs-btn-disabled-border-color: var(--color-burgundy);
  color: #fff;
  background-color: var(--color-burgundy);
  border-color: var(--color-burgundy) !important;
}
[data-listing-bookmark-form] .btn[aria-pressed="true"] .fa-heart,
.btn-favorite[aria-pressed="true"] .fa-heart {
  color: #fff;
}

/* Photo variant: appearance only. Its wrapping div controls placement. */
.btn-favorite-overlay {
    width: 1.75rem;
    height: 1.75rem;
    --bs-btn-border-color: var(--color-border-light-gray);
    --bs-btn-hover-border-color: var(--color-border-light-gray);
    --bs-btn-active-border-color: var(--color-border-light-gray);
    --bs-btn-color: white;
    --bs-btn-bg: rgba(0, 0, 0, .3);
    --bs-btn-hover-color: white;
    --bs-btn-hover-bg: rgba(0, 0, 0, .5);
    --bs-btn-active-color: white;
    --bs-btn-active-bg: rgba(0, 0, 0, .5);
}
.btn-favorite-overlay[aria-pressed="true"] { background: var(--color-burgundy); }

/* ==========================================================================
   SCROLL CONTROL BUTTON — Shared previous/next appearance for any content row.
   Use .btn.btn-scroll-control with a left or right Font Awesome icon.
   Edit size and shape here; use btn-light for Bootstrap light colors/states. A wrapper controls placement
   and spacing; the button's event handler determines which content it scrolls.
   ========================================================================== */

.btn-scroll-control {
    /* Match the normal Bootstrap button height, including padding and borders. */
    --scroll-control-size: calc(1em * var(--bs-btn-line-height) + 2 * var(--bs-btn-padding-y) + 2 * var(--bs-btn-border-width));
    width: var(--scroll-control-size);
    height: var(--scroll-control-size);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    --bs-btn-disabled-opacity: .4;
}

/* ==========================================================================
   INDUSTRY HELPERS — Reusable colors for any industry-related design.
   Color values: INDUSTRY COLORS in theme.css. These classes set appearance only.
   Use industry-icon for a small icon tile; position it with a wrapping div.
   ========================================================================== */

.industry-icon { width: 2.75rem; height: 2.75rem; font-size: 1.125rem; }
.industry-beauty { color: var(--industry-beauty-color); background-color: var(--industry-beauty-bg); }
.industry-healthcare { color: var(--industry-healthcare-color); background-color: var(--industry-healthcare-bg); }
.industry-hospitality { color: var(--industry-hospitality-color); background-color: var(--industry-hospitality-bg); }
.industry-office { color: var(--industry-office-color); background-color: var(--industry-office-bg); }
.industry-retail { color: var(--industry-retail-color); background-color: var(--industry-retail-bg); }
.industry-trades { color: var(--industry-trades-color); background-color: var(--industry-trades-bg); }
.industry-other { color: var(--industry-other-color); background-color: var(--industry-other-bg); }

/* Business identity: shared by workspace cards and available to other business views. */
.business-logo {
  width: var(--business-logo-size, 3.5rem);
  height: var(--business-logo-size, 3.5rem);
  aspect-ratio: 1;
  border-radius: 15px;
  object-fit: cover;
  flex-shrink: 0;
}
.business-industry {
  text-transform: uppercase;
  font-weight: 600;
  color: var(--business-industry-color, var(--industry-other-color));
}
.business-name {
  font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--bs-body-color);
  overflow-wrap: anywhere;
}
/* Stable industry slugs from business-classifications.json; unknown industries use the fallback. */
.business-industry--food-beverage { --business-industry-color: color-mix(in srgb, var(--color-orange) 80%, black); }
.business-industry--beauty-personal-care { --business-industry-color: var(--color-plum); }
.business-industry--retail-shopping { --business-industry-color: var(--color-green); }
.business-industry--professional-services { --business-industry-color: var(--color-navy); }
.business-industry--real-estate { --business-industry-color: var(--color-brown); }
.business-industry--finance-insurance { --business-industry-color: var(--color-midnight); }
.business-industry--healthcare { --business-industry-color: color-mix(in srgb, var(--color-blue) 80%, black); }
.business-industry--home-services { --business-industry-color: color-mix(in srgb, var(--color-clay) 80%, black); }
.business-industry--automotive { --business-industry-color: var(--color-burgundy); }
.business-industry--education-training { --business-industry-color: var(--color-olive); }
.business-industry--technology-marketing { --business-industry-color: var(--color-ocean); }
.business-industry--travel-transportation { --business-industry-color: var(--color-red); }
.business-industry--other { --business-industry-color: var(--industry-other-color); }
/* Category badges share the industry modifier classes and palette above. */
.industry-badge {
  color: var(--business-industry-color, var(--industry-other-color));
  background-color: color-mix(in srgb, var(--business-industry-color, var(--industry-other-color)) 12%, white);
  border: 1px solid color-mix(in srgb, var(--business-industry-color, var(--industry-other-color)) 30%, white);
}
.business-contacts { display: flex; flex-wrap: wrap; }
.business-contact {
  flex: 1 1 max-content;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   LISTING STATUS — Shared availability badges; text accompanies each color.
   ========================================================================== */
.listing-status-open { color: var(--color-green); background-color: color-mix(in srgb, var(--color-green) 10%, white); border-color: color-mix(in srgb, var(--color-green) 30%, white) !important; }
.listing-status-closed { color: var(--color-slate); background-color: var(--color-light-gray); }

/* ICON BUTTON — Shared appearance; wrapping elements control placement. */
.btn-icon {
  width: var(--icon-button-size, 2.75rem);
  height: var(--icon-button-size, 2.75rem);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Compact circular controls; compose with btn-icon on cards. */
.btn-icon-sm {
  --icon-button-size: 2.25rem;
  font-size: .875rem;
}

/* Shared status badges: use with status-badge on any page. */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: .4em .7em;
  border-radius: 50rem;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.status-draft, .status-unpublished {
  background-color: var(--bs-secondary-bg-subtle);
  color: var(--bs-secondary-text-emphasis);
}
.status-preview {
  background-color: var(--color-cream-yellow, var(--bs-warning));
  color: var(--color-black, #121212);
}
.status-active {
  background-color: var(--bs-teal, #20c997);
  color: var(--color-black, #121212);
}
.status-deleted {
  background-color: var(--bs-danger);
  color: #fff;
}
.status-terminated,
.status-suspended {
  background-color: var(--color-burgundy, #800020);
  color: #fff;
}
