/*
 * Share links (share.js) and "Near me" building picking (nearme.js).
 * Loaded after site.css and built from its tokens.
 */

/* ── Near me button in the address bar ─────────────────────────────── */
.address-bar .rr-near-btn {
    flex: 0 0 auto;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--cream);
    color: var(--navy);
    border: 1px solid var(--line);
    font-weight: 700;
}
.address-bar .rr-near-btn:hover { background: #e9f6ef; border-color: var(--sky); }
@media (max-width: 719px) {
    /* Phones: the input and Near me share the first row; the big button wraps. */
    .address-bar input { flex-basis: 120px; font-size: 17px; }
    .address-bar .rr-near-btn { padding: 10px 12px; }
}

/* ── Mobile bar with three actions ─────────────────────────────────── */
.rr-mobile-bar--3 { grid-template-columns: 1fr 1fr 1.7fr; }
.rr-mobile-bar--3 a { padding-left: 6px; padding-right: 6px; }
.rr-mobile-bar--3 a[data-near-me] { border-left: 1px solid rgba(255, 255, 255, .12); }
@media (max-width: 400px) {
    .rr-mobile-bar--3 a { gap: 5px; font-size: 14px; }
    .rr-mobile-bar--3 a:not(.mobile-bar-primary) .ui-icon { width: 16px; height: 16px; }
}

/* ── Share bar under the result's address ──────────────────────────── */
.rr-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.rr-share .btn { gap: 6px; text-decoration: none; }
.rr-share-note { flex-basis: 100%; min-height: 1em; font-size: 13px; color: var(--ok, #1d7a4f); }
.rr-share-note:empty { display: none; }

/* ── Picking a building near you ───────────────────────────────────── */
.estimator.rr-picking [data-steps],
.estimator.rr-picking [data-scan],
.estimator.rr-picking [data-map-chip],
.estimator.rr-picking [data-edit-outline],
.estimator.rr-picking [data-draw],
.estimator.rr-picking [data-house3d-card],
.estimator.rr-picking .est-panel > :not(.rr-pick) { display: none !important; }

.rr-pick .eyebrow { margin: 0 0 4px; }
.rr-pick-title { margin: 0; font-family: var(--display, 'Bebas Neue'), sans-serif; font-weight: 400; font-size: 30px; line-height: 1.05; color: var(--navy); letter-spacing: .01em; }
.rr-pick-lead { margin: 6px 0 12px; color: var(--ink-soft); font-size: 15px; }
.rr-pick-actions { margin: 12px 0 0; }

.rr-pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rr-pick-list button {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
    background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
    min-height: 56px;
}
.rr-pick-list button:hover, .rr-pick-list button:focus-visible { border-color: var(--sky); background: #f3fbf7; outline: none; }
.rr-pick-list button > svg { flex-shrink: 0; color: var(--ink-soft); margin-left: auto; }
.rr-pick-n, .rr-pick-num {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--lime); color: var(--navy); font-weight: 800; font-size: 13px;
}
.rr-pick-text { display: grid; gap: 2px; min-width: 0; }
.rr-pick-text strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rr-pick-text small { color: var(--ink-soft); font-size: 12.5px; }
.rr-pick-text small b { color: var(--navy); }
.rr-pick-wait { color: var(--ink-soft); font-weight: 500; }

/* Number labels on the map's outlines. */
.leaflet-tooltip.rr-pick-num { padding: 0; border: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); line-height: 26px; text-align: center; }
.leaflet-tooltip.rr-pick-num::before { display: none; }
.rr-pick-outline { cursor: pointer; }

.rr-pick-spin {
    display: block; width: 28px; height: 28px; margin: 14px 0 4px;
    border: 3px solid var(--line); border-top-color: var(--navy); border-radius: 50%;
    animation: rr-spin .8s linear infinite;
}
@keyframes rr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rr-pick-spin { animation-duration: 2.4s; } }
@media (max-width: 360px) {
    .rr-mobile-bar--3 a .ui-icon { display: none; }
}

/* ── "Share this demo" (demo bar, closing CTA) and its menu ─────────── */
.rr-demo-links { display: inline-flex; align-items: center; gap: 16px; flex-shrink: 0; }
.rr-share-base {
    display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
    font: inherit; font-weight: 600; color: var(--lime); white-space: nowrap; cursor: pointer;
}
.rr-share-base:hover { text-decoration: underline; }
@media (max-width: 719px) { .rr-share-base { font-size: 0; gap: 0; } .rr-share-base .ui-icon { width: 18px; height: 18px; } }

.rr-share-menu {
    position: absolute; z-index: 1200; width: 220px; padding: 6px;
    display: grid; gap: 2px; border-radius: 14px; background: #fff; color: var(--ink);
    box-shadow: var(--shadow-lg, 0 18px 50px rgba(0, 0, 0, .3));
}
.rr-share-menu[hidden] { display: none; }
.rr-share-menu > a, .rr-share-menu > button {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px;
    background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--navy); text-decoration: none; text-align: left; cursor: pointer;
}
.rr-share-menu > a:hover, .rr-share-menu > button:hover, .rr-share-menu > a:focus-visible, .rr-share-menu > button:focus-visible { background: var(--cream); outline: none; }
.rr-share-menu-note { padding: 0 12px; font-size: 13px; color: var(--ok); }
.rr-share-menu-note:empty { display: none; }
