/* VIO Trails Public CSS — v1.2.0, Updated: 2026-07-05 */

/* ---- Map wrap ---- */
.vio-map-wrap { margin: 1em 0; }
.vio-map-legend {
    background: #fff;
    border: 1px solid #e6e1d7;
    border-radius: 12px;
    padding: 10px 14px 6px;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}
.vio-legend-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}
.vio-legend-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4a4038;
}
.vio-legend-count {
    background: #2a1f1a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 8px;
    line-height: 1.5;
}
.vio-legend-hint {
    margin-left: auto;
    font-size: 11px;
    color: #9a8f83;
    font-style: italic;
}
.vio-legend-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.vio-legend-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    border: 1px solid #e2ddd3;
    background: #faf8f4;
    font-size: 12.5px;
    line-height: 1.3;
    color: #3a322b;
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow 0.15s ease, transform 0.15s ease,
        background 0.15s ease, color 0.15s ease;
}
.vio-legend-chip:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}
.vio-legend-chip.is-active {
    background: #2a1f1a;
    border-color: #2a1f1a;
    color: #fff;
}
.vio-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.vio-legend-chip .vio-purchase-link {
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    color: #b85c1a;
}
.vio-legend-chip.is-active .vio-purchase-link { color: #f0b27a; }

/* ---- Route wrap ---- */
.vio-route-wrap { margin: 1.5em 0; }
.vio-route-header { margin-bottom: 12px; }
.vio-route-title { margin: 0 0 6px; }
.vio-route-desc { color: #555; margin: 0 0 8px; }

.vio-route-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
}
.vio-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f0f4f8;
    border: 1px solid #dce4ec;
    border-radius: 16px;
    padding: 3px 10px;
    font-size: 12px;
    color: #444;
}
.vio-meta-chip .dashicons { font-size: 14px; width: 14px; height: 14px; }
.vio-meta-chip.vio-ev { color: #1a6f3c; background: #e8f5e9; border-color: #c3e6cb; }

/* ---- Purchase gate ---- */
.vio-purchase-gate { margin: 1em 0; }
.vio-purchase-box {
    background: #f9fafb;
    border: 2px solid #dce4ec;
    border-radius: 8px;
    padding: 20px 24px;
    text-align: center;
    max-width: 480px;
}
.vio-price { font-size: 1.6em; font-weight: bold; color: #222; margin: 8px 0; }
.vio-btn-purchase {
    display: inline-block;
    background: #2c8a2c;
    color: #fff !important;
    border-radius: 4px;
    padding: 10px 24px;
    font-size: 1em;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.vio-btn-purchase:hover { background: #1e6b1e; }

/* ---- Route inline map ---- */
.vio-route-map-wrap { margin-bottom: 16px; }

/* ---- Waypoint list ---- */
.vio-waypoints-list { margin: 1em 0; }
.vio-waypoints-list h3 { margin-bottom: 10px; }

.vio-leg-divider { text-align: center; margin: 6px 0; }
.vio-leg-info {
    display: inline-block;
    background: #e8f0fe;
    color: #3369d6;
    border-radius: 12px;
    padding: 3px 12px;
    font-size: 12px;
    border-left: none;
}

.vio-waypoint-card {
    display: flex;
    gap: 12px;
    border: 1px solid #e5e9ed;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 0;
    background: #fff;
}
.vio-waypoint-card:hover { border-color: #b8c4d0; }
.vio-waypoint-num {
    background: #333;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    min-width: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    margin-top: 2px;
}
.vio-waypoint-content { display: flex; gap: 12px; flex: 1; min-width: 0; }
.vio-waypoint-photo { flex-shrink: 0; }
.vio-waypoint-photo img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; cursor: pointer; }
.vio-waypoint-text { flex: 1; min-width: 0; }
.vio-waypoint-title { font-size: 1em; font-weight: 600; margin: 0 0 4px; }
.vio-stay-badge {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: normal;
    margin-left: 6px;
}
.vio-waypoint-desc { color: #555; font-size: 0.9em; margin: 4px 0; }
.vio-waypoint-link { font-size: 0.85em; }

/* ---- PDF export ---- */
.vio-pdf-export-wrap { margin: 16px 0; }
.vio-btn-pdf {
    display: inline-block;
    background: #555;
    color: #fff !important;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 0.9em;
    text-decoration: none;
}
.vio-btn-pdf:hover { background: #333; }

/* ---- Comments ---- */
.vio-comments-section { margin-top: 20px; border-top: 1px solid #e5e9ed; padding-top: 16px; }
.vio-add-comment textarea { width: 100%; box-sizing: border-box; margin-bottom: 8px; }

/* ---- Location card ---- */
.vio-location-card { margin: 1em 0; border: 1px solid #e5e9ed; border-radius: 8px; overflow: hidden; background: #fff; }
.vio-location-body { padding: 14px 16px; }
.vio-location-title { margin: 0 0 6px; }
.vio-category-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}
.vio-location-desc { color: #555; margin: 6px 0; }
.vio-location-details { margin: 8px 0; }
.vio-location-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.vio-location-features { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.vio-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f0f4f8;
    border: 1px solid #dce4ec;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
}
.vio-feature-tag .dashicons { font-size: 14px; width: 14px; height: 14px; }

/* ---- Access denied ---- */
.vio-access-denied { padding: 16px; background: #f9f9f9; border: 1px solid #ddd; border-radius: 6px; color: #555; }

/* ---- Error ---- */
.vio-error { color: #c00; font-size: 0.9em; }

/* ---- Lightbox basic ---- */
.vio-lightbox-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.85);
    z-index: 99999; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.vio-lightbox-overlay img { max-width: 90vw; max-height: 90vh; border-radius: 4px; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .vio-waypoint-content { flex-direction: column; }
    .vio-waypoint-photo img { width: 100%; height: 160px; }
    .vio-purchase-box { padding: 16px; }
}

/* ---- Waypoint markers (v1.1.0, dlbd-style photo/pin markers) ---- */
.vio-marker-wrap { background: none; border: none; }
.vio-marker {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 3px solid #3388ff;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    box-sizing: border-box;
    overflow: visible; /* badge + tail live outside the box */
}
.vio-marker-photo img {
    /* !important: themes and lazy-load styles fight marker image sizing */
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}
.vio-marker-plain {
    display: flex;
    align-items: center;
    justify-content: center;
}
.vio-marker-num {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.vio-marker-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 3px;
    border-radius: 9px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    box-sizing: content-box;
}
.vio-marker-tail {
    position: absolute;
    bottom: -11px;
    left: 50%;
    margin-left: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid #3388ff;
}

/* ---- Rich popups ---- */
.vio-popup .leaflet-popup-content { margin: 0; width: 260px !important; }
.vio-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 8px; overflow: hidden; }
.vio-popup-photo {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
}
.vio-popup-body { padding: 10px 12px 12px; }
.vio-popup-title { display: block; font-size: 15px; line-height: 1.25; margin-bottom: 4px; }
.vio-popup-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #666; margin-bottom: 6px; }
.vio-popup-cat-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.vio-popup-desc { font-size: 13px; line-height: 1.4; margin: 4px 0 6px; color: #333; }
.vio-popup-meta { display: block; font-size: 12px; color: #888; margin-bottom: 6px; }
.vio-popup-link { font-size: 13px; font-weight: 600; text-decoration: none; }

/* ---- Marker clusters (v1.2.0): subtle count bubbles at low zoom ---- */
.vio-cluster-wrap { background: none; border: none; }
.vio-cluster {
    background: rgba(42, 31, 26, 0.82); /* VIO deep brown */
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    transition: transform 0.15s ease;
}
.vio-cluster:hover { transform: scale(1.08); }

/* Guard against site-wide lazy-load CSS (img[loading="lazy"]{opacity:0}):
   Leaflet injects marker/popup images dynamically, so lazy-load scanners
   never fade them in. Keep them always visible. */
.vio-marker-photo img,
.vio-popup-photo {
    opacity: 1 !important;
}
