/**
 * QLM AI Directory Pro - Frontend Stylesheet
 *
 * Scoped, responsive, production-hardened styles for directory archives,
 * Google-style single search bars, expandable detailed search drawers, results-only
 * initial landing views, listing grid/list cards, single business profiles, star ratings,
 * Leaflet maps, AEO FAQ accordions, native review forms, claim modals, and agency footers.
 *
 * @package    QLM_Directory
 * @subpackage QLM_Directory/Assets/CSS
 * @author     QLM Business Solutions <https://qlmbusinesssolutions.com/>
 */

/* ==========================================================================
   1. CSS Variables & Reset Scope
   ========================================================================== */

:root {
    --qlm-primary: #2563eb;
    --qlm-primary-hover: #1d4ed8;
    --qlm-primary-light: #eff6ff;
    --qlm-primary-border: #bfdbfe;

    --qlm-accent-gold: #f59e0b;
    --qlm-accent-gold-hover: #d97706;
    --qlm-accent-gold-light: #fef3c7;

    --qlm-success: #10b981;
    --qlm-success-dark: #047857;
    --qlm-success-light: #ecfdf5;

    --qlm-danger: #dc2626;
    --qlm-danger-hover: #b91c1c;
    --qlm-danger-light: #fef2f2;

    --qlm-text-main: #111827;
    --qlm-text-muted: #374151;
    --qlm-text-subtle: #6b7280;
    --qlm-border-color: #e5e7eb;
    --qlm-border-alt: #d1d5db;
    --qlm-bg-card: #ffffff;
    --qlm-bg-alt: #f9fafb;
    --qlm-bg-subtle: #f3f4f6;

    --qlm-radius-sm: 4px;
    --qlm-radius-md: 8px;
    --qlm-radius-lg: 12px;
    --qlm-radius-full: 9999px;

    --qlm-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --qlm-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --qlm-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --qlm-shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.qlm-directory-archive-page,
.qlm-single-listing-page,
.qlm-directory-container,
.qlm-modal-dialog,
.qlm-standalone-claim-container,
.qlm-featured-listings-wrapper,
.qlm-google-search-shortcode-wrapper {
    box-sizing: border-box;
    font-family: inherit;
    color: var(--qlm-text-main);
    line-height: 1.5;
}

.qlm-directory-archive-page *,
.qlm-single-listing-page *,
.qlm-directory-container *,
.qlm-modal-dialog *,
.qlm-standalone-claim-container *,
.qlm-featured-listings-wrapper *,
.qlm-google-search-shortcode-wrapper * {
    box-sizing: border-box;
}

.qlm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ==========================================================================
   2. Archive Header & Breadcrumbs
   ========================================================================== */

.qlm-archive-header {
    text-align: center;
    margin-bottom: 35px;
}

.qlm-archive-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--qlm-text-main);
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.qlm-archive-subtitle {
    color: var(--qlm-text-subtle);
    font-size: 1.125rem;
    margin: 0;
}

.qlm-archive-description {
    max-width: 760px;
    margin: 0 auto;
    color: var(--qlm-text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.qlm-breadcrumb-nav {
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--qlm-text-subtle);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.qlm-breadcrumb-nav a {
    color: var(--qlm-text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.qlm-breadcrumb-nav a:hover {
    color: var(--qlm-primary);
    text-decoration: underline;
}

.qlm-breadcrumb-nav .qlm-breadcrumb-current {
    color: var(--qlm-text-main);
    font-weight: 600;
}

/* ==========================================================================
   3. Search & Filter Bar Controls (Google-Style Bar & Detailed Drawer)
   ========================================================================== */

.qlm-search-bar-wrapper {
    background: var(--qlm-bg-card);
    padding: 22px;
    border-radius: var(--qlm-radius-lg);
    border: 1px solid var(--qlm-border-color);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.qlm-search-bar-wrapper:hover {
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.qlm-primary-search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

.qlm-single-input-wrapper {
    position: relative;
    flex: 1;
}

.qlm-single-input-wrapper input[type="text"] {
    width: 100%;
    height: 50px;
    padding: 10px 45px 10px 44px;
    border: 2px solid var(--qlm-border-color);
    border-radius: var(--qlm-radius-md);
    font-size: 15px;
    color: var(--qlm-text-main);
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.qlm-single-input-wrapper input[type="text"]:focus {
    border-color: var(--qlm-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.qlm-clear-search-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4b5563;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.qlm-clear-search-btn:hover {
    background: #d1d5db;
    color: #111827;
}

#qlm-toggle-detailed-filters-btn {
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--qlm-border-alt);
    border-radius: var(--qlm-radius-md);
    background: #ffffff;
    color: var(--qlm-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

#qlm-toggle-detailed-filters-btn:hover {
    background: var(--qlm-bg-subtle);
    color: var(--qlm-text-main);
}

#qlm-toggle-detailed-filters-btn.active {
    background: var(--qlm-primary-light);
    border-color: var(--qlm-primary-border);
    color: var(--qlm-primary);
}

#qlm-toggle-detailed-filters-btn.active .qlm-arrow-indicator {
    transform: rotate(180deg);
}

#qlm-primary-search-submit {
    height: 50px;
    padding: 0 26px;
    background: var(--qlm-primary);
    border: 1px solid var(--qlm-primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--qlm-radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.1s ease;
}

#qlm-primary-search-submit:hover {
    background: var(--qlm-primary-hover);
    border-color: var(--qlm-primary-hover);
}

#qlm-primary-search-submit:active {
    transform: translateY(1px);
}

/* Detailed Filters Expandable Drawer */
.qlm-detailed-drawer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #f3f4f6;
    animation: qlmDrawerSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes qlmDrawerSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qlm-search-field-group {
    display: flex;
    flex-direction: column;
}

.qlm-search-field-group label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--qlm-text-muted);
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.qlm-search-field-group label .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: var(--qlm-primary);
}

.qlm-search-field-group input[type="text"],
.qlm-search-field-group select {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--qlm-border-alt);
    border-radius: var(--qlm-radius-sm);
    font-size: 14px;
    color: var(--qlm-text-main);
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.qlm-search-field-group input[type="text"]:focus,
.qlm-search-field-group select:focus {
    border-color: var(--qlm-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

/* Results Summary Bar & Layout Toggles */
.qlm-results-bar,
.qlm-results-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 14px 0;
    border-bottom: 1px solid var(--qlm-border-color);
}

.qlm-results-count {
    font-weight: 600;
    color: var(--qlm-text-muted);
    font-size: 14px;
}

.qlm-layout-toggles {
    display: flex;
    gap: 8px;
}

.qlm-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--qlm-border-alt);
    border-radius: var(--qlm-radius-sm);
    background: #ffffff;
    color: var(--qlm-text-muted);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.qlm-view-btn:hover {
    background: var(--qlm-bg-subtle);
    color: var(--qlm-text-main);
}

.qlm-view-btn.active {
    background: var(--qlm-primary);
    border-color: var(--qlm-primary);
    color: #ffffff;
}

/* ==========================================================================
   4. Listings Grid, List Layout & Cards
   ========================================================================== */

.qlm-listings-grid {
    display: grid;
    gap: 25px;
}

.qlm-columns-1 {
    grid-template-columns: 1fr;
}

.qlm-columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}

.qlm-columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.qlm-columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.qlm-listing-card {
    background: var(--qlm-bg-card);
    border: 1px solid var(--qlm-border-color);
    border-radius: var(--qlm-radius-md);
    overflow: hidden;
    box-shadow: var(--qlm-shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.qlm-listing-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--qlm-shadow-md);
    border-color: #cbd5e1;
}

/* Premium Card Highlighting */
.qlm-listing-card.qlm-card-premium {
    border: 2px solid var(--qlm-accent-gold);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.15);
}

.qlm-listing-card.qlm-card-premium:hover {
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.22);
}

/* Card Media / Thumbnail */
.qlm-card-media {
    position: relative;
    width: 100%;
    height: 200px;
    background: var(--qlm-bg-subtle);
    overflow: hidden;
}

.qlm-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.qlm-listing-card:hover .qlm-card-media img {
    transform: scale(1.03);
}

.qlm-card-badges-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

/* Status Badges */
.qlm-badge-premium {
    background: var(--qlm-accent-gold);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--qlm-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.qlm-badge-verified {
    background: var(--qlm-success);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--qlm-radius-sm);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Card Body */
.qlm-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.qlm-card-category {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--qlm-primary);
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.qlm-card-title {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.qlm-card-title a {
    color: var(--qlm-text-main);
    text-decoration: none;
    transition: color 0.15s ease;
}

.qlm-card-title a:hover {
    color: var(--qlm-primary);
}

.qlm-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--qlm-text-muted);
    margin-bottom: 10px;
}

.qlm-card-location .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--qlm-text-subtle);
}

.qlm-card-excerpt {
    font-size: 13px;
    color: var(--qlm-text-subtle);
    line-height: 1.5;
    margin: 0 0 15px 0;
}

/* Card Footer */
.qlm-card-footer {
    padding-top: 15px;
    border-top: 1px solid var(--qlm-bg-alt);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.qlm-card-actions {
    display: flex;
    gap: 8px;
}

.qlm-btn-call {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--qlm-primary-light);
    color: var(--qlm-primary);
    border: 1px solid var(--qlm-primary-border);
    border-radius: var(--qlm-radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.qlm-btn-call:hover {
    background: #dbeafe;
    color: var(--qlm-primary-hover);
}

.qlm-btn-website {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #ffffff;
    color: var(--qlm-text-muted);
    border: 1px solid var(--qlm-border-alt);
    border-radius: var(--qlm-radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.qlm-btn-website:hover {
    background: var(--qlm-bg-alt);
    color: var(--qlm-text-main);
}

.qlm-btn-details {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--qlm-primary);
    color: #ffffff;
    border-radius: var(--qlm-radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
}

.qlm-btn-details:hover {
    background: var(--qlm-primary-hover);
}

/* List View Row Transformation */
.qlm-directory-container[data-view="list"] .qlm-listings-grid,
.qlm-view-list .qlm-listings-grid {
    grid-template-columns: 1fr;
}

.qlm-card-list {
    flex-direction: row;
}

.qlm-card-list .qlm-card-media {
    width: 280px;
    min-width: 280px;
    height: auto;
}

@media screen and (max-width: 768px) {
    .qlm-card-list {
        flex-direction: column;
    }
    .qlm-card-list .qlm-card-media {
        width: 100%;
        min-width: 100%;
        height: 200px;
    }
}

/* ==========================================================================
   5. Star Ratings & Composite Trust Visuals
   ========================================================================== */

.qlm-star-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.qlm-stars-visual {
    color: var(--qlm-accent-gold);
    display: inline-flex;
    gap: 1px;
}

.qlm-stars-visual .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.qlm-rating-number {
    font-weight: 700;
    color: var(--qlm-text-main);
    font-size: 13px;
    margin-left: 3px;
}

.qlm-review-count {
    color: var(--qlm-text-subtle);
    font-size: 12px;
}

/* ==========================================================================
   6. Single Listing Profile Layout
   ========================================================================== */

.qlm-single-listing-page {
    background: var(--qlm-bg-alt);
    padding: 40px 0;
}

.qlm-single-header-card {
    background: #ffffff;
    border: 1px solid var(--qlm-border-color);
    border-radius: var(--qlm-radius-md);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--qlm-shadow-sm);
}

.qlm-single-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media screen and (max-width: 900px) {
    .qlm-single-layout {
        grid-template-columns: 1fr;
    }
}

.qlm-single-listing-page .card {
    background: #ffffff;
    border: 1px solid var(--qlm-border-color);
    border-radius: var(--qlm-radius-md);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--qlm-shadow-sm);
}

.qlm-listing-thumbnail {
    margin-bottom: 30px;
    border-radius: var(--qlm-radius-md);
    overflow: hidden;
    max-height: 420px;
    box-shadow: var(--qlm-shadow-sm);
}

.qlm-listing-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.qlm-content-body {
    color: var(--qlm-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.qlm-content-body p {
    margin-bottom: 1.25em;
}

/* Ownership Claim Call-to-Action Card */
.qlm-claim-cta-card {
    background: var(--qlm-primary-light);
    border: 1px solid var(--qlm-primary-border);
    border-radius: var(--qlm-radius-md);
    padding: 25px;
    text-align: center;
    box-shadow: var(--qlm-shadow-sm);
}

.qlm-claim-cta-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e3a8a;
    margin: 0 0 8px 0;
}

.qlm-claim-cta-card p {
    font-size: 13px;
    color: #1e40af;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

/* ==========================================================================
   7. Answer Engine Optimization (AEO) FAQ Accordion
   ========================================================================== */

.qlm-faqs-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--qlm-text-main);
    margin: 0 0 10px 0;
}

.qlm-faq-accordion details {
    border-bottom: 1px solid var(--qlm-border-color);
    padding: 14px 0;
    transition: background 0.15s ease;
}

.qlm-faq-accordion details:last-child {
    border-bottom: none;
}

.qlm-faq-accordion summary {
    font-weight: 600;
    color: var(--qlm-text-main);
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
}

.qlm-faq-accordion summary::-webkit-details-marker {
    display: none;
}

.qlm-faq-accordion summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--qlm-text-subtle);
    transition: transform 0.2s ease;
}

.qlm-faq-accordion details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

.qlm-faq-accordion details div {
    margin-top: 10px;
    color: var(--qlm-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    padding-left: 8px;
}

/* ==========================================================================
   8. Customer Reviews & Dual Trust Scores
   ========================================================================== */

.qlm-trust-summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--qlm-radius-md);
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.qlm-review-card {
    background: #ffffff;
    border: 1px solid var(--qlm-border-color);
    border-radius: var(--qlm-radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.qlm-owner-reply-box {
    margin-top: 15px;
    background: #f8fafc;
    border-left: 3px solid var(--qlm-primary);
    padding: 12px 15px;
    border-radius: 0 var(--qlm-radius-sm) var(--qlm-radius-sm) 0;
}

/* Star Rating Radio Form Hover Selector */
.qlm-star-rating-selector {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
}

.qlm-star-rating-selector input[type="radio"] {
    display: none;
}

.qlm-star-rating-selector label {
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.15s ease;
}

.qlm-star-rating-selector label:hover,
.qlm-star-rating-selector label:hover ~ label,
.qlm-star-rating-selector input[type="radio"]:checked ~ label {
    color: var(--qlm-accent-gold);
}

.qlm-no-reviews-box,
.qlm-no-results-card {
    text-align: center;
    padding: 50px 20px;
    background: var(--qlm-bg-alt);
    border: 1px dashed var(--qlm-border-alt);
    border-radius: var(--qlm-radius-md);
}

.qlm-no-reviews-box .dashicons,
.qlm-no-results-card .dashicons {
    font-size: 44px;
    width: 44px;
    height: 44px;
    color: var(--qlm-text-subtle);
    margin-bottom: 12px;
}

/* ==========================================================================
   9. Claim Modal Popup Dialog & Compliance
   ========================================================================== */

.qlm-modal-overlay {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px 10px;
}

.qlm-modal-dialog {
    background: #ffffff;
    max-width: 540px;
    margin: 40px auto;
    border-radius: var(--qlm-radius-lg);
    box-shadow: var(--qlm-shadow-modal);
    border: 1px solid var(--qlm-border-color);
    overflow: hidden;
    position: relative;
    animation: qlmModalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes qlmModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.qlm-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.qlm-modal-close-btn {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--qlm-text-subtle);
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    transition: color 0.15s ease;
}

.qlm-modal-close-btn:hover {
    color: var(--qlm-text-main);
}

.qlm-modal-target-box {
    background: #f8fafc;
    padding: 12px 25px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    color: #334155;
}

.qlm-consent-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--qlm-radius-sm);
    padding: 14px;
    margin-bottom: 20px;
}

.qlm-consent-container input[type="checkbox"] {
    accent-color: var(--qlm-primary);
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   10. Leaflet OpenStreetMap Styling & Map Markers
   ========================================================================== */

#qlm-directory-leaflet-map,
#qlm-single-listing-map {
    position: relative;
    z-index: 1;
}

.leaflet-popup-content-wrapper {
    border-radius: var(--qlm-radius-md);
    box-shadow: var(--qlm-shadow-md);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    line-height: 1.4;
}

.qlm-map-popup-card {
    padding: 14px;
    min-width: 200px;
}

.qlm-map-popup-card h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 700;
}

.qlm-map-popup-card a {
    color: var(--qlm-text-main);
    text-decoration: none;
}

.qlm-map-popup-card a:hover {
    color: var(--qlm-primary);
}

.qlm-map-popup-card .qlm-popup-phone {
    font-size: 12px;
    color: var(--qlm-text-muted);
    margin-bottom: 8px;
}

.qlm-map-popup-card .qlm-popup-link {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--qlm-primary);
    text-decoration: underline;
}

/* ==========================================================================
   11. Agency Footer Attribution Badge
   ========================================================================== */

.qlm-agency-footer-badge {
    text-align: center;
    margin: 30px auto;
    padding: 15px;
    max-width: 720px;
    font-size: 13px;
    color: var(--qlm-text-subtle);
    border-top: 1px solid var(--qlm-border-color);
}

.qlm-agency-footer-badge strong {
    color: var(--qlm-text-main);
}

/* ==========================================================================
   12. Pagination, Alerts & Interactive Feedback
   ========================================================================== */

.qlm-pagination ul,
.qlm-archive-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.qlm-pagination li a,
.qlm-pagination li span,
.qlm-archive-pagination a,
.qlm-archive-pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--qlm-border-alt);
    border-radius: var(--qlm-radius-sm);
    color: var(--qlm-text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    background: #ffffff;
    transition: all 0.15s ease;
}

.qlm-pagination li .current,
.qlm-archive-pagination .current {
    background: var(--qlm-primary);
    border-color: var(--qlm-primary);
    color: #ffffff;
}

.qlm-pagination li a:hover,
.qlm-archive-pagination a:hover {
    background: var(--qlm-bg-subtle);
    color: var(--qlm-text-main);
}

.qlm-alert {
    padding: 12px 16px;
    border-radius: var(--qlm-radius-sm);
    font-size: 13px;
    margin-top: 14px;
    line-height: 1.45;
}

.qlm-alert-success {
    background: var(--qlm-success-light);
    border: 1px solid #a7f3d0;
    color: var(--qlm-success-dark);
}

.qlm-alert-error {
    background: var(--qlm-danger-light);
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Form Buttons Loading Spinner State */
.qlm-btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
}

.qlm-btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    animation: qlmSpin 0.6s linear infinite;
}

@keyframes qlmSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   13. Responsive Breakpoint Optimizations
   ========================================================================== */

@media screen and (max-width: 782px) {
    .qlm-primary-search-row {
        flex-wrap: wrap;
    }

    .qlm-single-input-wrapper {
        width: 100%;
        flex: 1 1 100%;
    }

    #qlm-toggle-detailed-filters-btn,
    #qlm-primary-search-submit {
        flex: 1;
        justify-content: center;
    }

    .qlm-search-form {
        grid-template-columns: 1fr;
    }

    .qlm-search-bar-wrapper {
        padding: 16px;
    }

    .qlm-columns-2,
    .qlm-columns-3,
    .qlm-columns-4 {
        grid-template-columns: 1fr;
    }

    .qlm-single-header-card {
        padding: 20px;
    }

    .qlm-single-header-card h1 {
        font-size: 1.75rem !important;
    }

    .qlm-trust-summary-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .qlm-modal-dialog {
        margin: 20px auto;
        max-width: 95%;
    }
}