/* Flavor Rentals — Visual Sitemap (v1.1.13 Wave B)
 *
 * BEM `frs-sitemap-*` prefix throughout.
 * Why not the existing `flavor-` prefix used elsewhere? Avada / Fusion-Builder
 * sometimes scrubs or rewrites `flavor-*` classes during template injection,
 * and the BreadcrumbList incident in v1.1.9 cemented the policy: anything
 * we render directly into wp_head + the_content gets a unique namespace.
 *
 * Mobile-first. Single column by default; the top-card row + section grids
 * expand at >= 768px.
 *
 * Theme tokens — picks up the per-site primary color (existing
 * flavor_rentals_primary_color option) via the inline custom-property
 * injection done by class-shortcode.php.
 */

.frs-sitemap-wrap {
    --frs-sitemap-accent: var(--flavor-primary, #1a73e8);
    --frs-sitemap-accent-soft: var(--flavor-primary-tint, #eaf0fe);
    --frs-sitemap-radius: 10px;
    --frs-sitemap-shadow: 0 1px 3px rgba(0,0,0,0.06);
    --frs-sitemap-border: 1px solid #e3e6ea;
    --frs-sitemap-text: #1d2327;
    --frs-sitemap-muted: #6c757d;

    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--frs-sitemap-text);
    line-height: 1.5;
}

/* ---------- Header ---------- */
.frs-sitemap-header {
    margin-bottom: 24px;
}
.frs-sitemap-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.2;
}
.frs-sitemap-lede {
    color: var(--frs-sitemap-muted);
    font-size: 15px;
    margin: 0;
}

/* ---------- Stats band ---------- */
.frs-sitemap-statsband {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 16px 20px;
    background: var(--frs-sitemap-accent-soft);
    border-radius: var(--frs-sitemap-radius);
    margin: 0 0 28px;
}
.frs-sitemap-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.frs-sitemap-stat-num {
    font-size: 22px;
    font-weight: 700;
    color: var(--frs-sitemap-accent);
    line-height: 1;
}
.frs-sitemap-stat-label {
    font-size: 13px;
    color: var(--frs-sitemap-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.frs-sitemap-stat-sep {
    color: var(--frs-sitemap-muted);
    opacity: 0.5;
    font-size: 18px;
    line-height: 1;
}

/* ---------- Top cards (3 across on desktop, stacked on mobile) ---------- */
.frs-sitemap-topcards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0 0 36px;
}
@media (min-width: 768px) {
    .frs-sitemap-topcards {
        grid-template-columns: repeat(3, 1fr);
    }
}
.frs-sitemap-card {
    background: #fff;
    border: var(--frs-sitemap-border);
    border-radius: var(--frs-sitemap-radius);
    padding: 16px 18px 12px;
    box-shadow: var(--frs-sitemap-shadow);
}
.frs-sitemap-card-head {
    margin-bottom: 12px;
}
.frs-sitemap-card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--frs-sitemap-text);
}
.frs-sitemap-card-sub {
    font-size: 12px;
    color: var(--frs-sitemap-muted);
    margin: 0;
}
.frs-sitemap-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: frs-rank;
}
.frs-sitemap-card-item {
    counter-increment: frs-rank;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}
.frs-sitemap-card-item:last-child { border-bottom: 0; }
.frs-sitemap-card-item::before {
    content: counter(frs-rank);
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    background: var(--frs-sitemap-accent-soft);
    color: var(--frs-sitemap-accent);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.frs-sitemap-card-thumb {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.frs-sitemap-card-thumb-empty {
    background-color: #f1f3f5;
    background-image: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
}
.frs-sitemap-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}
.frs-sitemap-card-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--frs-sitemap-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.frs-sitemap-card-link:hover {
    color: var(--frs-sitemap-accent);
    text-decoration: underline;
}
.frs-sitemap-card-meta-inline {
    font-weight: 400;
    color: var(--frs-sitemap-muted);
}
.frs-sitemap-card-meta {
    font-size: 12px;
    color: var(--frs-sitemap-muted);
    margin-top: 1px;
}

/* ---------- Section wrapper ---------- */
.frs-sitemap-section {
    margin: 0 0 36px;
}
.frs-sitemap-section-head {
    margin-bottom: 14px;
    border-bottom: 2px solid var(--frs-sitemap-accent);
    padding-bottom: 6px;
}
.frs-sitemap-section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--frs-sitemap-text);
}
.frs-sitemap-section-intro {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--frs-sitemap-muted);
}

/* ---------- Section groups (by city) ---------- */
.frs-sitemap-group {
    margin-bottom: 18px;
}
.frs-sitemap-group-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--frs-sitemap-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------- Link rows (used by Communities, Areas, Landings, Pages, Posts) ---------- */
.frs-sitemap-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 640px) {
    .frs-sitemap-link-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0 16px;
    }
}
.frs-sitemap-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}
.frs-sitemap-link-thumb {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
}
.frs-sitemap-link-thumb-empty {
    background-image: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
}
.frs-sitemap-link-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}
.frs-sitemap-link-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--frs-sitemap-text);
    text-decoration: none;
    line-height: 1.3;
}
.frs-sitemap-link-name:hover {
    color: var(--frs-sitemap-accent);
    text-decoration: underline;
}
.frs-sitemap-link-meta {
    font-size: 13px;
    color: var(--frs-sitemap-muted);
}
.frs-sitemap-link-pill {
    flex: 0 0 auto;
    background: var(--frs-sitemap-accent-soft);
    color: var(--frs-sitemap-accent);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.frs-sitemap-link-pill-warn {
    background: #fff8dc;
    color: #8a6d00;
}

/* ---------- Units list (collapsible per community) ---------- */
.frs-sitemap-collapse {
    background: #fff;
    border: var(--frs-sitemap-border);
    border-radius: var(--frs-sitemap-radius);
    padding: 0;
    margin-bottom: 10px;
    overflow: hidden;
}
.frs-sitemap-collapse-summary {
    cursor: pointer;
    list-style: none;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fafbfc;
    transition: background 0.15s;
}
.frs-sitemap-collapse-summary:hover { background: #f1f3f5; }
.frs-sitemap-collapse-summary::-webkit-details-marker { display: none; }
.frs-sitemap-collapse-summary::marker { display: none; }
.frs-sitemap-collapse-summary::before {
    content: '▸';
    font-size: 12px;
    margin-right: 6px;
    color: var(--frs-sitemap-accent);
    transition: transform 0.15s;
}
.frs-sitemap-collapse[open] > .frs-sitemap-collapse-summary::before {
    transform: rotate(90deg);
}
.frs-sitemap-collapse-name {
    flex: 1 1 auto;
    font-size: 15px;
    font-weight: 600;
}
.frs-sitemap-collapse-name a {
    color: inherit;
    text-decoration: none;
}
.frs-sitemap-collapse-name a:hover {
    color: var(--frs-sitemap-accent);
}
.frs-sitemap-collapse-count {
    font-size: 12px;
    color: var(--frs-sitemap-muted);
    background: var(--frs-sitemap-accent-soft);
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.frs-sitemap-unit-list {
    list-style: none;
    padding: 6px 0;
    margin: 0;
}
.frs-sitemap-unit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid #f1f3f5;
}
.frs-sitemap-unit-thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 42px;
    border-radius: 5px;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
}
.frs-sitemap-unit-thumb-empty {
    background-image: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
}
.frs-sitemap-unit-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.frs-sitemap-unit-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--frs-sitemap-text);
    text-decoration: none;
    line-height: 1.3;
}
.frs-sitemap-unit-link:hover {
    color: var(--frs-sitemap-accent);
    text-decoration: underline;
}
.frs-sitemap-unit-meta {
    font-size: 12px;
    color: var(--frs-sitemap-muted);
}
.frs-sitemap-unit-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.frs-sitemap-unit-rent {
    font-size: 15px;
    font-weight: 700;
    color: var(--frs-sitemap-text);
}
.frs-sitemap-unit-period {
    font-size: 11px;
    font-weight: 400;
    color: var(--frs-sitemap-muted);
}
.frs-sitemap-unit-avail {
    font-size: 11px;
    color: var(--frs-sitemap-muted);
    margin-top: 2px;
}
.frs-sitemap-unit-avail-now {
    color: #1f883d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------- Show all disclosure (after first N items) ---------- */
.frs-sitemap-show-all {
    margin-top: 6px;
}
.frs-sitemap-show-all > summary {
    cursor: pointer;
    color: var(--frs-sitemap-accent);
    font-size: 14px;
    font-weight: 600;
    padding: 6px 0;
    list-style: none;
}
.frs-sitemap-show-all > summary::-webkit-details-marker { display: none; }
.frs-sitemap-show-all > summary:hover { text-decoration: underline; }

/* ---------- FAQ accordion ---------- */
.frs-sitemap-faq-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 768px) {
    .frs-sitemap-faq-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}
.frs-sitemap-faq-community {
    background: #fafbfc;
    border: var(--frs-sitemap-border);
    border-radius: 8px;
}
.frs-sitemap-faq-summary {
    cursor: pointer;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    font-weight: 600;
}
.frs-sitemap-faq-summary::-webkit-details-marker { display: none; }
.frs-sitemap-faq-summary::before {
    content: '▸';
    font-size: 11px;
    color: var(--frs-sitemap-accent);
    margin-right: 6px;
    transition: transform 0.15s;
}
.frs-sitemap-faq-community[open] > .frs-sitemap-faq-summary::before {
    transform: rotate(90deg);
}
.frs-sitemap-faq-count {
    font-size: 11px;
    color: var(--frs-sitemap-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.frs-sitemap-faq-grid {
    list-style: none;
    padding: 8px 14px 14px;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px 16px;
}
@media (min-width: 480px) {
    .frs-sitemap-faq-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .frs-sitemap-faq-grid { grid-template-columns: repeat(3, 1fr); }
}
.frs-sitemap-faq-grid a {
    display: block;
    padding: 5px 0;
    font-size: 13px;
    color: var(--frs-sitemap-text);
    text-decoration: none;
}
.frs-sitemap-faq-grid a:hover {
    color: var(--frs-sitemap-accent);
    text-decoration: underline;
}

/* ---------- Recently Added strip ---------- */
.frs-sitemap-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.frs-sitemap-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 14px;
}
.frs-sitemap-recent-tag {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #e9ecef;
    color: #495057;
}
.frs-sitemap-recent-tag-unit    { background: #d1f4e8; color: #0a6b4d; }
.frs-sitemap-recent-tag-area    { background: #e0e7ff; color: #283d9e; }
.frs-sitemap-recent-tag-post    { background: #fde2e2; color: #92400e; }
.frs-sitemap-recent-tag-landing { background: #fef3c7; color: #92400e; }
.frs-sitemap-recent-link {
    flex: 1 1 auto;
    color: var(--frs-sitemap-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.frs-sitemap-recent-link:hover {
    color: var(--frs-sitemap-accent);
    text-decoration: underline;
}
.frs-sitemap-recent-when {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--frs-sitemap-muted);
}

/* ---------- Footer ---------- */
.frs-sitemap-footer {
    margin-top: 48px;
    padding-top: 18px;
    border-top: var(--frs-sitemap-border);
    color: var(--frs-sitemap-muted);
    font-size: 13px;
}
.frs-sitemap-footer p {
    margin: 0 0 4px;
}
.frs-sitemap-footer a {
    color: var(--frs-sitemap-accent);
    text-decoration: none;
}
.frs-sitemap-footer a:hover { text-decoration: underline; }
.frs-sitemap-meta {
    font-size: 11px;
    opacity: 0.7;
}

/* ---------- Filter input (v1.1.14 Wave C-01) ---------- */
.frs-sitemap-filter {
    position: relative;
    margin: 16px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.frs-sitemap-filter-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--frs-sitemap-muted);
}
.frs-sitemap-filter-input {
    flex: 1 1 auto;
    max-width: 480px;
    height: 40px;
    padding: 0 36px 0 14px;
    border: 1px solid #cbd2d9;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: var(--frs-sitemap-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.frs-sitemap-filter-input::placeholder { color: #9aa3ad; }
.frs-sitemap-filter-input:focus {
    outline: none;
    border-color: var(--frs-sitemap-accent);
    box-shadow: 0 0 0 3px var(--frs-sitemap-accent-soft);
}
.frs-sitemap-filter-clear {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 28px;
    height: 28px;
    margin: auto 0 auto 0;
    transform: translateX(calc(min(480px, 100%) - 30px));
    border: 0;
    background: transparent;
    color: var(--frs-sitemap-muted);
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
}
.frs-sitemap-filter-clear:hover {
    color: var(--frs-sitemap-text);
    background: #f1f3f5;
}
.frs-sitemap-filter-count {
    font-size: 12px;
    color: var(--frs-sitemap-muted);
    font-weight: 600;
}
.frs-sitemap-wrap.frs-sitemap-is-filtering .frs-sitemap-statsband,
.frs-sitemap-wrap.frs-sitemap-is-filtering .frs-sitemap-topcards,
.frs-sitemap-wrap.frs-sitemap-is-filtering .frs-sitemap-recent {
    /* When user is filtering, hide the editorial bits and focus on results. */
    display: none;
}
.frs-sitemap-wrap.frs-sitemap-is-filtering .frs-sitemap-collapse {
    /* Force-open the unit collapsers while filtering so matching units inside
       a community are visible without an extra click. */
}
.frs-sitemap-wrap.frs-sitemap-is-filtering .frs-sitemap-collapse:not([open]) {
    /* No way to programmatically open <details> from CSS; the JS toggles
       open=true on filter for any collapser containing a visible unit.
       Reserved selector for future explicit styling. */
}

/* ---------- Print stylesheet (v1.1.14 Wave C-03) ---------- */
@media print {
    .frs-sitemap-wrap {
        max-width: none;
        margin: 0;
        padding: 0;
        font-size: 11pt;
        color: #000;
    }
    .frs-sitemap-statsband,
    .frs-sitemap-topcards,
    .frs-sitemap-filter,
    .frs-sitemap-recent,
    .frs-sitemap-show-all > summary,
    .frs-sitemap-link-thumb,
    .frs-sitemap-card-thumb,
    .frs-sitemap-unit-thumb {
        display: none !important;
    }
    /* Force-show the contents of every <details> on print — even when not
       [open] — so readers don't lose data behind a chevron they can't click. */
    .frs-sitemap-collapse > *,
    .frs-sitemap-faq-community > *,
    .frs-sitemap-show-all > * {
        display: revert !important;
    }
    .frs-sitemap-collapse-summary,
    .frs-sitemap-faq-summary {
        cursor: default;
        background: none;
        padding: 4pt 0;
    }
    .frs-sitemap-collapse-summary::before,
    .frs-sitemap-faq-summary::before {
        display: none;
    }
    .frs-sitemap-section-head {
        border-bottom: 1px solid #000;
    }
    .frs-sitemap-section-title {
        font-size: 14pt;
    }
    .frs-sitemap-link-row,
    .frs-sitemap-unit,
    .frs-sitemap-recent-item {
        page-break-inside: avoid;
    }
    .frs-sitemap-link-name,
    .frs-sitemap-unit-link,
    .frs-sitemap-card-link {
        color: #000;
        text-decoration: none;
    }
    .frs-sitemap-link-name::after,
    .frs-sitemap-unit-link::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555;
        font-weight: 400;
    }
    .frs-sitemap-footer { display: none; }
}
