/* Quote Requests — map screen + lead modal.
   Values taken from the approved Claude design (MulchSpot Quote Requests.dc.html). */

:root {
    --mlq-ink: #414A54;
    --mlq-muted: #8A939C;
    --mlq-muted-2: #6C7680;
    --mlq-faint: #A6AEB5;
    --mlq-line: #E1E5E9;
    --mlq-line-soft: #EDEFF1;
    --mlq-line-row: #F3F5F6;
    --mlq-green: #8CC63F;
    --mlq-green-dark: #5F8F21;
    --mlq-green-tint: #F0F6E6;
}

/* ---- layer toggle (design: pill group on #F1F3F5) ---- */
.mlq-map-toggle { background: #F1F3F5; border-radius: 999px; padding: 4px; gap: 0; }
.mlq-map-toggle .mlq-mode-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; background: transparent; border-radius: 999px; padding: 10px 22px; font-size: 13px; font-weight: 600; color: var(--mlq-muted); box-shadow: none; }
.mlq-map-toggle .mlq-mode-btn:hover { color: var(--mlq-ink); }
.mlq-map-toggle .mlq-mode-btn.active,
.mlq-map-toggle .mlq-mode-btn.btn-primary { background: #fff; color: var(--mlq-ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* Live count per layer. JS fills these, so the pill must collapse while it is
   empty — otherwise a blank bubble sits next to the label on first paint. */
.mlq-mode-count { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: #E4E8EB; color: var(--mlq-muted-2); font-size: 11px; font-weight: 600; line-height: 1; }
.mlq-mode-btn.active .mlq-mode-count { background: var(--mlq-green); color: #fff; }
.mlq-mode-count:empty { display: none; }

/* ---- search panel ---- */
.search-mulchspot .bg-primary { padding: 15px 18px; }
.search-mulchspot h3 { font-size: 17px; font-weight: 600; }
.mlq-geo-btn { font-size: 11.5px; font-weight: 600; border-radius: 4px; }
/* Desktop keeps the words; the icon is for the phone, where the control is a
   square beside the search field. */
#mlqGeoBtn .mlq-geo-icon { display: none; }
.mlq-geo-btn.mlq-geo-on { background: var(--mlq-green-tint); border-color: var(--mlq-green); color: var(--mlq-green-dark); }
#mlqGeoNote { font-size: 10.5px; color: #9AA3AC; }

/* ---- service filter chips ---- */
.mlq-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mlq-chips.d-none { display: none !important; }
.mlq-chip { border: 1px solid var(--mlq-line); background: #fff; border-radius: 999px; padding: 5px 11px; font-size: 11px; font-weight: 500; color: var(--mlq-muted-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: border-color .15s, background .15s; }
.mlq-chip:hover { border-color: var(--mlq-green); }
.mlq-chip.active { border-color: var(--mlq-green); background: #F5F8F0; color: var(--mlq-ink); }
.mlq-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
/* The lead type's uploaded marker, shown instead of the colour dot when one is
   configured. Same rule as the map pins and the legend. */
.mlq-chip-pin { width: 11px; height: auto; max-height: 15px; object-fit: contain; flex-shrink: 0; }

/* ---- panel marker list (design: three-column list + pager) ---- */
/* Parent (.px-3.pb-3) already supplies the horizontal padding — only add the
   gap that separates the list from the chips / geo button above it. */
.mlq-list { margin-top: 16px; }
.mlq-list-head { display: grid; grid-template-columns: 1fr 74px 62px; gap: 8px; padding: 0 0 8px; border-bottom: 1px solid var(--mlq-line-soft); font-size: 11.5px; font-weight: 600; color: var(--mlq-ink); }
.mlq-list-head span:last-child, .mlq-list-row span:last-child { text-align: right; }
.mlq-list-rows { max-height: 320px; overflow-y: auto; }
.mlq-list-row { display: grid; grid-template-columns: 1fr 74px 62px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--mlq-line-row); cursor: pointer; font-size: 11.5px; color: var(--mlq-muted-2); }
.mlq-list-row:hover { background: #FAFBFB; }
.mlq-list-col1 { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--mlq-ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Every cell, not just spans: below the 375px design target the fixed 68px/52px
   tracks are narrower than a long suburb ("QUAKERS HILL" wants 78px), so the
   text has to truncate rather than be sliced mid-glyph. min-width:0 lets the
   1fr track shrink past its content instead of pushing the row wider. */
.mlq-list-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlq-list-empty { padding: 14px 0; font-size: 12px; color: var(--mlq-muted); }
.mlq-list-pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 0; font-size: 12.5px; color: #7C8794; }
.mlq-list-pager button { border: none; background: none; cursor: pointer; color: #7C8794; font-size: 16px; line-height: 1; padding: 0 6px; }
.mlq-list-pager button:disabled { opacity: .35; cursor: default; }

/* ---- legend (design: bottom-right card over the map) ---- */
/* Top-right: keeps clear of Google's zoom/pan controls at the bottom-right. */
.mlq-legend { position: absolute; right: 14px; top: 14px; background: rgba(255,255,255,.95); border-radius: 6px; padding: 11px 14px; box-shadow: 0 3px 12px rgba(0,0,0,.14); z-index: 2; }
/* The show/hide mechanism, flipped by mlqSetMode(). Deliberately NOT Bootstrap's
   .d-none: that is display:none!important, so the moment a `display` is added to
   .mlq-legend below (the phone block already restyles it) the two would collide
   and !important would win silently. Two classes deep so this beats any
   single-class .mlq-legend rule wherever it sits in this file. */
.mlq-legend.mlq-legend--hidden { display: none; }
.mlq-legend-title { font-size: 10.5px; font-weight: 600; color: var(--mlq-ink); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.mlq-legend-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--mlq-muted-2); margin-bottom: 6px; }
.mlq-legend-row:last-child { margin-bottom: 0; }
.mlq-legend-row .mlq-dot { width: 17px; height: 17px; }

/* ---- lead modal ---- */
#mlqLeadModal .modal-content { border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.3); border: none; }
#mlqLeadModal .modal-header { padding: 22px 26px; border-bottom: 1px solid var(--mlq-line-soft); }
#mlqLeadModal .modal-header h4 { font-size: 16.5px; font-weight: 600; color: var(--mlq-ink); }
#mlqLeadModal .modal-header .small { font-size: 12.5px; color: var(--mlq-muted); }
#mlqLeadModal .modal-body { padding: 22px 26px; }
.mlq-modal-dot { width: 9px; height: 9px; }

/* chips: expiry / buyers / photo count */
#mlqLeadModal .badge { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 5px 11px; }
#mlqLeadModal .mlq-badge-expiry { color: #B4761E; background: #FDF4E3; }
#mlqLeadModal .mlq-badge-buyers { color: var(--mlq-green-dark); background: var(--mlq-green-tint); }
#mlqLeadModal .mlq-badge-photos { color: #5C666F; background: #F1F3F5; }

/* The timing / property type / site access strip above the photos is shared with
   the account popup, so it lives in quote-shared.css (a declared dependency of
   this file). Only the breakpoint it collapses at is local, see below. */

/* The heading marker: a plain colour dot, or the lead type's uploaded pin when
   one is configured. JS swaps an <img> in and adds the modifier. */
.mlq-modal-dot--pin { width: auto; height: auto; border-radius: 0; background: none; }
.mlq-modal-dot--pin img { display: block; width: 15px; height: auto; max-height: 21px; object-fit: contain; }
.mlq-modal-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mlq-modal-photos img,
.mlq-modal-photos video { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 6px; background: #000; }
.mlq-modal-description { font-size: 13px; color: var(--mlq-muted-2); line-height: 1.65; }
#mlqLeadModal .fw-bold { font-size: 13px; color: var(--mlq-ink); }

/* locked contact box */
.mlq-locked-box { background: #FAFBFB; border: 1px solid var(--mlq-line-soft); border-radius: 8px; padding: 18px 20px; }
.mlq-locked-bar { height: 15px; border-radius: 4px; background: #DDE2E6; margin-bottom: 8px; }
.mlq-unlock-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.mlq-locked-box .btn { border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.mlq-locked-box .btn-primary { background: var(--mlq-green); border-color: var(--mlq-green); letter-spacing: .06em; padding: 13px 26px; }
.mlq-locked-box .btn-outline-primary { border-color: var(--mlq-green); color: var(--mlq-green-dark); padding: 13px 24px; }
.mlq-locked-box .small { font-size: 11px; color: #9AA3AC; line-height: 1.55; }

/* ---- map notes below the map (design: three explainer cards) ---- */
.mlq-map-notes { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.mlq-map-note { flex: 1; min-width: 230px; border: 1px solid #E6E9ED; border-radius: 8px; padding: 16px 18px; }
.mlq-map-note-title { font-size: 13px; font-weight: 600; color: var(--mlq-ink); margin-bottom: 5px; }
.mlq-map-note-body { font-size: 12.5px; color: var(--mlq-muted); line-height: 1.55; }

/* ---- phones (design has explicit 375px screens) ----
   The filter panel is position-xl-absolute, so below xl it already sits in
   normal flow above the map — only the pieces that were sized for the desktop
   overlay need shrinking here. */
@media (max-width: 575.98px) {
    .mlq-map-toggle .mlq-mode-btn { font-size: 12px; padding: 8px 12px; }

    /* Legend: over the map it covers Google's controls on a narrow screen, so
       drop it into normal flow underneath instead. */
    .mlq-legend { position: static; right: auto; top: auto; margin-top: 12px; box-shadow: none; border: 1px solid var(--mlq-line-soft); background: #fff; }
    .mlq-legend-row { font-size: 12px; }

    /* Marker list: the 74px/62px desktop columns squeeze the job type to a
       couple of characters at 375px. */
    .mlq-list-head, .mlq-list-row { grid-template-columns: 1fr 68px 52px; gap: 6px; font-size: 11px; }
    .mlq-list-rows { max-height: 260px; }

    /* Lead modal */
    #mlqLeadModal .modal-header, #mlqLeadModal .modal-body { padding-left: 16px; padding-right: 16px; }
    .mlq-meta-strip { grid-template-columns: 1fr; gap: 10px; }
    .mlq-modal-photos { grid-template-columns: repeat(2, 1fr); }
    .mlq-unlock-actions { flex-direction: column; align-items: stretch; }
    .mlq-locked-box .mlq-unlock { width: 100%; text-align: center; }
}

/* ---- collapse control: icon-only, inline beside the mode tabs ----
   Sits in the same row as the tabs so it can never overlap them, and hides only
   the white search/list panel — the tabs stay usable with the panel closed. */
.mlq-toggle-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: .5rem; }
.mlq-toggle-row .mlq-map-toggle { flex: 1 1 auto; margin-bottom: 0; }

.mlq-panel-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    border: 1px solid var(--mlq-line);
    border-radius: 999px;
    background: #fff;
    color: var(--mlq-muted-2);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: color .15s, border-color .15s, background .15s;
}
/* Revealed only once the script has wired it, so it is never a dead control. */
.mlq-map-ready .mlq-panel-toggle { display: inline-flex; }
.mlq-panel-toggle svg { display: block; }
.mlq-panel-toggle:hover { border-color: var(--mlq-green); color: var(--mlq-green-dark); }
/* Filled state while the panel is hidden, so it reads as "filter is on". */
.mlq-panel-toggle[aria-expanded="false"] {
    background: var(--mlq-green);
    border-color: var(--mlq-green);
    color: #fff;
}

#mlqSearchPanel.mlq-panel-collapsed { display: none; }

/* ---- per-service counts on the chips + off-screen nudge ---- */
.mlq-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 2px;
    padding: 0 5px;
    border-radius: 999px;
    background: #F1F3F5;
    color: var(--mlq-muted-2);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.mlq-chip.active .mlq-chip-count { background: var(--mlq-green); color: #fff; }
/* Nothing on screen for this service — dimmed, not hidden, so it is clear the
   service exists and simply has no pins in view. */
.mlq-chip.mlq-chip-empty { opacity: .5; }
.mlq-chip.mlq-chip-empty .mlq-chip-count { background: #EDEFF1; }

.mlq-list-offscreen {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #FDF4E3;
    color: #B4761E;
    font-size: 11.5px;
    line-height: 1.45;
}
.mlq-list-offscreen[hidden] { display: none; }

/* Uploaded pin shown in the legend in place of the colour dot. */
.mlq-legend-pin { width: 17px; height: auto; max-height: 22px; object-fit: contain; flex-shrink: 0; }
