/* ==========================================================================
   VT Points of Interest — vt-poi.css
   Matches the collapsible-section pattern used by ps-idx-search so the
   "What's Nearby" section blends seamlessly with Interior/Exterior Features.
   Primary colour: #24386A (navy)  Secondary: #8D9BA1 (slate)
   ========================================================================== */

/* --- Loading state -------------------------------------------------------- */

.vt-poi-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    color: #6c757d;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}

.vt-poi-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e0e0e0;
    border-top-color: #24386A;
    border-radius: 50%;
    animation: vt-poi-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes vt-poi-spin {
    to { transform: rotate(360deg); }
}

/* --- Groups grid ---------------------------------------------------------- */

.vt-poi-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 20px 0 8px;
}

/* --- Individual group card ------------------------------------------------ */

.vt-poi-group {
    background: #f7f6f3;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.vt-poi-group:hover {
    box-shadow: 0 3px 12px rgba(36, 56, 106, 0.10);
}

.vt-poi-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #24386A;
    color: #fff;
}

.vt-poi-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.vt-poi-group-label {
    font-family: 'Lato', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* --- Items list ----------------------------------------------------------- */

.vt-poi-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vt-poi-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid #e8e8e8;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
}

.vt-poi-item:last-child {
    border-bottom: none;
}

.vt-poi-name {
    color: #333;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vt-poi-distance {
    color: #8D9BA1;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* --- Attribution & empty states ------------------------------------------ */

.vt-poi-attribution {
    font-size: 11px;
    color: #aaa;
    padding-top: 8px;
    margin: 0;
    font-family: 'Lato', sans-serif;
}

.vt-poi-attribution a {
    color: #8D9BA1;
}

.vt-poi-empty {
    padding: 20px 0;
    color: #6c757d;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    margin: 0;
}

.vt-poi-error {
    padding: 12px 0;
    color: #c0392b;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
}

/* --- Collapsible integration ---------------------------------------------- */
/* The outer collapsible-section / collapsible-header / collapsible-content
   classes are already styled by ps-idx-search/assets/css/style.css.
   We only need to ensure the inner content has the right padding. */

.vt-poi-collapsible-content {
    padding-bottom: 12px;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 599px) {
    .vt-poi-groups {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .vt-poi-groups {
        grid-template-columns: repeat(2, 1fr);
    }
}
