/**
 * NearbyVibe - Frontend Styles
 * Designed for dark page backgrounds
 * Mobile-first responsive design with alternating layouts
 */

/* CSS Variables */
:root {
    --poi-primary: #2a2f3a;
    --poi-secondary: #3498db;
    --poi-accent: #f5a623;
    --poi-text: #333;
    --poi-text-light: #666;
    --poi-text-muted: #888;
    --poi-bg-card: #ffffff;
    --poi-bg-alt: #f5f7fa;
    --poi-border: #e8eaed;
    --poi-shadow: 0 8px 30px rgba(0,0,0,0.12);
    --poi-radius: 16px;
    --poi-transition: 0.3s ease;
}

/* Container */
.poi-display-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Category Section */
.poi-category-section {
    margin-bottom: 50px;
}

.poi-category-section:last-child {
    margin-bottom: 0;
}

.poi-category-wrapper {
    display: flex;
    flex-direction: column;
    background: var(--poi-bg-card);
    border-radius: var(--poi-radius);
    box-shadow: var(--poi-shadow);
    overflow: hidden;
}

/* Desktop: Side-by-side layout */
@media (min-width: 768px) {
    .poi-category-wrapper {
        flex-direction: row;
        min-height: 550px;
    }
    
    /* Image Left (default) */
    .poi-layout-left .poi-image-panel {
        order: 1;
    }
    .poi-layout-left .poi-content-panel {
        order: 2;
    }
    
    /* Image Right (alternating) */
    .poi-layout-right .poi-image-panel {
        order: 2;
    }
    .poi-layout-right .poi-content-panel {
        order: 1;
    }
}

/* Image Panel */
.poi-image-panel {
    position: relative;
    flex: 0 0 45%;
    min-height: 300px;
    background: #1a1a1a;
}

@media (min-width: 768px) {
    .poi-image-panel {
        min-height: 550px;
    }
}

.poi-category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poi-category-icon {
    font-size: 16px;
}

.poi-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.poi-location-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.poi-location-image.active {
    opacity: 1;
}

.poi-location-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Slideshow Styles */
.poi-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.poi-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.poi-slide.active {
    opacity: 1;
}

.poi-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.poi-slide-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.poi-slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.poi-slide-dot.active {
    background: #fff;
    transform: scale(1.2);
}

.poi-slide-dot:hover {
    background: rgba(255,255,255,0.7);
}

.poi-photo-attribution {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 5;
}

.poi-photo-attribution a {
    color: #fff;
    text-decoration: none;
}

/* Content Panel */
.poi-content-panel {
    flex: 1;
    padding: 35px;
    display: flex;
    flex-direction: column;
    background: var(--poi-bg-card);
}

/* Height mode: "Show all" stretches to fit every place. */
.poi-content-panel.poi-height-auto {
    max-height: none;
    overflow: visible;
}

/* Height mode: fixed box with an internal scrollbar (--poi-content-h set inline). */
.poi-content-panel.poi-height-fixed {
    max-height: var(--poi-content-h, 550px);
    overflow-y: auto;
}

/* Back-compat: panels rendered before the height option existed. */
.poi-content-panel:not(.poi-height-auto):not(.poi-height-fixed) {
    max-height: 550px;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .poi-content-panel {
        padding: 40px;
    }
}

/* Custom scrollbar for content panel */
.poi-content-panel::-webkit-scrollbar {
    width: 6px;
}

.poi-content-panel::-webkit-scrollbar-track {
    background: var(--poi-bg-alt);
    border-radius: 3px;
}

.poi-content-panel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.poi-content-panel::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.poi-category-title {
    display: none; /* Hide redundant title since badge shows category */
}

/* Accordion */
.poi-accordion {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.poi-accordion-item {
    border-bottom: 1px solid var(--poi-border);
}

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

.poi-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 18px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all var(--poi-transition);
}

.poi-accordion-header:hover .poi-location-name {
    color: var(--poi-secondary);
}

.poi-accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.poi-location-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--poi-text);
    transition: color var(--poi-transition);
}

.poi-location-rating-inline {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: var(--poi-accent);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.poi-accordion-icon {
    width: 24px;
    height: 24px;
    color: var(--poi-text-muted);
    transition: transform var(--poi-transition);
}

.poi-accordion-icon svg {
    width: 100%;
    height: 100%;
}

.poi-accordion-item.active .poi-accordion-icon {
    transform: rotate(180deg);
}

/* Accordion Content */
.poi-accordion-content {
    overflow: hidden;
    transition: height var(--poi-transition);
}

.poi-accordion-body {
    padding: 0 18px 25px 18px;
}

/* Location Details */
.poi-location-details {
    margin-bottom: 15px;
}

.poi-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--poi-text);
}

.poi-detail-icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.poi-detail-row a {
    color: var(--poi-secondary);
    text-decoration: none;
    transition: color var(--poi-transition);
}

.poi-detail-row a:hover {
    color: #217dbb;
    text-decoration: underline;
}

.poi-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--poi-border);
}

.poi-meta-item {
    font-size: 13px;
    color: var(--poi-text-light);
}

.poi-rating {
    color: var(--poi-accent);
    font-weight: 600;
}

.poi-rating-value {
    color: var(--poi-text);
    margin-left: 4px;
}

.poi-price {
    color: #27ae60;
    font-weight: 700;
}

.poi-subcategory {
    background: var(--poi-bg-alt);
    color: var(--poi-text-light);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* Description */
.poi-location-description {
    color: var(--poi-text-light);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Hours */
.poi-hours {
    margin-bottom: 15px;
}

.poi-hours-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--poi-text);
    padding: 10px 0;
    transition: color var(--poi-transition);
}

.poi-hours-toggle:hover {
    color: var(--poi-secondary);
}

.poi-hours-icon {
    font-size: 10px;
    transition: transform var(--poi-transition);
}

.poi-hours.open .poi-hours-icon {
    transform: rotate(180deg);
}

.poi-hours-list {
    background: var(--poi-bg-alt);
    padding: 15px 18px;
    border-radius: 10px;
    margin-top: 10px;
}

.poi-hours-day {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid var(--poi-border);
}

.poi-hours-day:last-child {
    border-bottom: none;
}

.poi-day-name {
    font-weight: 500;
    color: var(--poi-text);
}

.poi-day-time {
    color: var(--poi-text-light);
}

/* Action Buttons */
.poi-location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.poi-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--poi-transition);
    cursor: pointer;
}

.poi-btn-directions {
    background: var(--poi-secondary);
    color: #fff;
}

.poi-btn-directions:hover {
    background: #217dbb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.poi-btn-website {
    background: transparent;
    color: var(--poi-text);
    border: 2px solid var(--poi-border);
}

.poi-btn-website:hover {
    background: var(--poi-primary);
    color: #fff;
    border-color: var(--poi-primary);
    transform: translateY(-2px);
}

/* Error/Empty States */
.poi-error,
.poi-empty {
    text-align: center;
    padding: 60px 30px;
    background: var(--poi-bg-card);
    border-radius: var(--poi-radius);
    color: var(--poi-text-light);
    box-shadow: var(--poi-shadow);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .poi-display-container {
        padding: 15px;
    }
    
    .poi-category-section {
        margin-bottom: 30px;
    }
    
    .poi-image-panel {
        min-height: 280px;
    }
    
    .poi-content-panel {
        padding: 25px;
        max-height: none;
    }
    
    .poi-accordion-header {
        padding: 14px 0;
    }
    
    .poi-location-name {
        font-size: 1em;
    }
    
    .poi-location-actions {
        flex-direction: column;
    }
    
    .poi-action-btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.poi-accordion-body {
    animation: slideDown 0.3s ease;
}

/* Accessibility */
.poi-accordion-header:focus {
    outline: 2px solid var(--poi-secondary);
    outline-offset: 2px;
}

.poi-accordion-header:focus:not(:focus-visible) {
    outline: none;
}

/* Print Styles */
@media print {
    .poi-image-panel {
        display: none;
    }
    
    .poi-content-panel {
        width: 100%;
        max-height: none;
    }
    
    .poi-accordion-content {
        display: block !important;
        height: auto !important;
    }
    
    .poi-accordion-icon {
        display: none;
    }
    
    .poi-action-btn {
        display: none;
    }
}

/* ==========================================================================
   NearbyVibe 1.1 — Grid / Cards / Map layouts (Pro)
   ========================================================================== */

.nv-grid-section { margin-bottom: 40px; }

.nv-grid-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4em;
    color: var(--poi-primary, #2c3e50);
    margin: 0 0 16px;
}

.nv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.nv-grid-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}

.nv-grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.nv-grid-image img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.nv-grid-body { padding: 14px 16px 18px; }

.nv-grid-title { margin: 0 0 6px; font-size: 1.05em; }
.nv-grid-title a { color: var(--poi-secondary, #3498db); text-decoration: none; }
.nv-grid-title a:hover { text-decoration: underline; }

.nv-grid-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.nv-grid-address { font-size: .85em; color: #666; margin: 0 0 6px; }
.nv-grid-desc { font-size: .9em; color: #444; margin: 0; }

/* Cards variant: horizontal media cards */
.nv-cards-container .nv-grid { grid-template-columns: 1fr; max-width: 760px; }
.nv-cards-container .nv-grid-item { flex-direction: row; }
.nv-cards-container .nv-grid-image { flex: 0 0 220px; }
.nv-cards-container .nv-grid-image img { height: 100%; min-height: 160px; }

@media (max-width: 600px) {
    .nv-cards-container .nv-grid-item { flex-direction: column; }
    .nv-cards-container .nv-grid-image { flex: none; }
}

/* Map layout */
.nv-map {
    width: 100%;
    height: 480px;
    border-radius: 10px;
    z-index: 0;
}

.nv-map-pin span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--poi-primary, #2c3e50);
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    font-size: 16px;
}

.nv-map-pin span > * { transform: rotate(45deg); }

.nv-map-popup { min-width: 180px; }
.nv-map-popup img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.nv-map-popup strong { display: block; margin-bottom: 2px; }
.nv-map-popup a { color: var(--poi-secondary, #3498db); }

/* ==========================================================================
   NearbyVibe 1.4 - Design polish layer
   Brand gradient, richer states, a11y focus, motion refinements.
   ========================================================================== */

:root {
    --nv-brand: #7c3aed;
    --nv-brand-2: #3498db;
    --nv-grad: linear-gradient(135deg, #7c3aed 0%, #3498db 100%);
    --nv-star: #f5a623;
}

/* Category badge picks up the brand gradient */
.poi-category-badge {
    background: var(--nv-grad);
    color: #fff;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    border: 0;
}

/* Accordion: smoother, springier open/close */
.poi-accordion-content {
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.poi-accordion-item {
    border-radius: 10px;
    transition: background 0.2s ease;
}

.poi-accordion-item.active {
    background: var(--poi-bg-alt);
}

.poi-accordion-header:hover {
    background: rgba(124, 58, 237, 0.05);
}

/* Ratings read as gold, everywhere */
.poi-rating,
.poi-location-rating-inline {
    color: var(--nv-star);
}

/* Directions button joins the brand */
.poi-btn-directions {
    background: var(--nv-grad);
}

.poi-btn-directions:hover {
    background: var(--nv-grad);
    filter: brightness(1.08);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
}

.poi-btn-website:hover {
    background: var(--nv-brand);
    border-color: var(--nv-brand);
}

/* Keyboard a11y: visible focus rings on all interactive pieces */
.poi-accordion-header:focus-visible,
.poi-hours-toggle:focus-visible,
.poi-action-btn:focus-visible,
.poi-slide-dot:focus-visible {
    outline: 3px solid var(--nv-brand);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Slide dots: larger touch targets */
.poi-slide-dot {
    min-width: 12px;
    min-height: 12px;
}

.poi-slide-dot.active {
    background: var(--nv-brand);
    transform: scale(1.25);
}

/* Hours list: subtle left accent */
.poi-hours-list {
    border-left: 3px solid var(--nv-brand);
}

/* Card hover lift on grid/cards layouts (already defined; deepen slightly) */
.nv-grid-item:hover {
    box-shadow: 0 12px 32px rgba(15, 17, 21, 0.16);
}

/* Mobile: tighter, comfier spacing */
@media (max-width: 600px) {
    .poi-display-container { padding: 12px; }
    .poi-accordion-header { padding: 14px 12px; }
    .poi-action-btn { width: 100%; }
}

/* Respect reduced-motion users */
@media (prefers-reduced-motion: reduce) {
    .poi-accordion-content,
    .poi-accordion-item,
    .poi-action-btn,
    .poi-slide,
    .nv-grid-item {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   NearbyVibe 1.4.2 — Mobile overhaul + height-mode polish
   Appended last so it wins on source order over earlier @media blocks.
   ========================================================================== */

/* "Show all" on desktop: keep the image in view instead of stretching it to
   the full (potentially very tall) content height. */
@media (min-width: 768px) {
    .poi-category-wrapper { align-items: stretch; }
    .poi-content-panel.poi-height-auto { min-height: 0; }
    .poi-content-panel.poi-height-auto ~ .poi-image-panel,
    .poi-layout-left .poi-content-panel.poi-height-auto + .poi-image-panel,
    .poi-image-panel { align-self: stretch; }
}

/* ---- Tablet & phone (<= 768px) ---- */
@media (max-width: 768px) {
    .poi-display-container { padding: 14px; }

    .poi-category-section { margin-bottom: 22px; }

    /* Stack: image on top, content below — no side-by-side cramming */
    .poi-category-wrapper { flex-direction: column; min-height: 0; }
    .poi-image-panel { min-height: 220px; width: 100%; }

    /* Fixed-height mode: never taller than the viewport on a phone */
    .poi-content-panel { padding: 20px 18px; }
    .poi-content-panel.poi-height-fixed { max-height: min(var(--poi-content-h, 550px), 70vh); }
    .poi-content-panel.poi-height-auto { max-height: none; }

    /* Category badge: smaller, never overlapping the panel edge */
    .poi-category-badge {
        top: 14px; left: 14px;
        padding: 7px 13px; font-size: 12px; letter-spacing: 0.3px;
    }
    .poi-category-icon { font-size: 14px; }

    /* Accordion header: comfortable tap target, title wraps cleanly */
    .poi-accordion-header { padding: 15px 4px; gap: 10px; }
    .poi-accordion-title { flex-wrap: wrap; gap: 6px 10px; row-gap: 6px; min-width: 0; }
    .poi-location-name { font-size: 1.02em; word-break: break-word; }
    .poi-location-rating-inline { font-size: 11px; padding: 3px 8px; }
    .poi-accordion-icon { flex: 0 0 auto; }

    /* Body spacing */
    .poi-accordion-body { padding: 0 0 20px; }
    .poi-location-details { margin-bottom: 12px; }
    .poi-detail-row { gap: 8px; font-size: 14px; }
    .poi-location-description { font-size: 0.95em; }

    /* Meta row wraps; items don't collide */
    .poi-meta-row { gap: 8px 14px; margin-top: 12px; padding-top: 12px; }
    .poi-meta-item { font-size: 12px; }

    /* Action buttons: full width, stacked, real spacing */
    .poi-location-actions { flex-direction: column; gap: 10px; margin-top: 16px; }
    .poi-action-btn { width: 100%; padding: 13px 20px; }

    /* Hours list breathing room */
    .poi-hours-list { padding: 12px 14px; }

    /* Slideshow controls sit clear of the photo attribution */
    .poi-slide-indicators { bottom: 14px; }
    .poi-photo-attribution { bottom: 8px; right: 8px; font-size: 10px; padding: 3px 7px; }

    /* Grid / cards (Pro) → single column with comfortable gaps */
    .nv-grid { grid-template-columns: 1fr; gap: 16px; }
    .nv-grid-section { margin-bottom: 28px; }
    .nv-cards-container .nv-grid-item { flex-direction: column; }
    .nv-cards-container .nv-grid-image { flex: none; }
    .nv-cards-container .nv-grid-image img { height: 190px; min-height: 0; }
    .nv-grid-heading { font-size: 1.25em; }

    /* Map (Pro): shorter on phones */
    .nv-map { height: 340px; }
}

/* ---- Small phone (<= 480px) ---- */
@media (max-width: 480px) {
    .poi-display-container { padding: 10px; }
    .poi-image-panel { min-height: 180px; }
    .poi-content-panel { padding: 16px 14px; }
    .poi-accordion-header { padding: 14px 2px; }
    .poi-category-badge { top: 10px; left: 10px; padding: 6px 11px; font-size: 11px; }
    .poi-location-name { font-size: 0.98em; }
    .poi-detail-row a { word-break: break-word; }
    .nv-map { height: 280px; }
}

/* ==========================================================================
   NearbyVibe 1.4.4 — Polished mobile card layout
   Replaces the 1.4.3 full-bleed block. Appended LAST so it wins on source order.
   Goals: keep the card (radius + shadow), hard vertical stack (image on top,
   content below, nothing overlapping), fill the photo box (cover, no black bars).
   ========================================================================== */

/* Anchor links to a category land below any sticky site header */
.poi-category-section { scroll-margin-top: 90px; }

@media (max-width: 768px) {
    .poi-display-container { padding: 12px; }
    .poi-category-section  { margin-bottom: 20px; scroll-margin-top: 80px; }

    /* Keep the card look: rounded corners, soft shadow, image clipped to it */
    .poi-category-wrapper {
        display: block;
        flex-direction: column;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 6px 22px rgba(16,24,40,.10);
        background: #fff;
    }

    /* Image = fixed box on top; absolutely-positioned photos stay inside it */
    .poi-image-panel {
        flex: none !important;
        display: block;
        width: 100%;
        height: 210px;
        min-height: 0;
        position: relative;
        overflow: hidden;
        background: #eef0f3;
    }
    .poi-image-container { position: absolute; inset: 0; height: 100%; min-height: 0; }

    /* Fill the box cleanly on phones — no letterbox bars (base uses contain) */
    .poi-location-image img,
    .poi-slide img {
        object-fit: cover !important;
        object-position: center;
    }

    /* Content = real block below, real padding, never clipped */
    .poi-content-panel {
        flex: none !important;
        display: block;
        width: 100%;
        padding: 20px 18px !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .poi-content-panel.poi-height-fixed { max-height: none !important; overflow: visible !important; }
    .poi-category-title { font-size: 1.15rem; margin: 0 0 14px; }

    /* Badge sits inside the image, clear of the edges */
    .poi-category-badge { top: 12px; left: 12px; padding: 7px 13px; font-size: 12px; }

    /* Accordion header lives in the content card — never over the image */
    .poi-accordion-header { padding: 14px 2px; gap: 10px; align-items: center; }
    .poi-accordion-title  { flex-wrap: wrap; gap: 6px 10px; min-width: 0; }
    .poi-location-name    { font-size: 1rem; font-weight: 600; word-break: break-word; }
    .poi-location-rating-inline { font-size: 11px; padding: 3px 8px; }

    .poi-detail-row       { gap: 8px; font-size: 14px; }
    .poi-detail-row a     { word-break: break-word; }
    .poi-location-actions { flex-direction: column; gap: 10px; margin-top: 16px; }
    .poi-action-btn       { width: 100%; padding: 13px 20px; }

    /* Slideshow dots + attribution sit clear at the bottom of the photo */
    .poi-slide-indicators  { bottom: 12px; }
    .poi-photo-attribution { bottom: 8px; right: 8px; font-size: 10px; padding: 3px 7px; }
}

@media (max-width: 480px) {
    .poi-display-container { padding: 10px; }
    .poi-category-wrapper  { border-radius: 14px; }
    .poi-image-panel       { height: 190px; }
    .poi-content-panel     { padding: 18px 15px !important; }
    .poi-category-badge    { top: 10px; left: 10px; font-size: 11px; padding: 6px 11px; }
}
/* ==========================================================================
   NearbyVibe 1.4.5 — wider mobile card, accordion side padding, Hours polish
   Appended LAST so it wins on source order.
   ========================================================================== */

/* --- Hours: consistent, card-styled toggle + list (all breakpoints) --- */
.poi-hours-toggle {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
    padding: 11px 14px;
    background: var(--poi-bg-alt);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
}
.poi-hours-toggle .poi-hours-label { flex: 1 1 auto; text-align: left; }
.poi-hours-toggle .poi-hours-icon { margin-left: auto; font-size: 11px; }
.poi-hours.open .poi-hours-toggle { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.poi-hours-list {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding: 8px 16px 12px;
}
.poi-hours-day { padding: 9px 2px; font-size: 13px; }
.poi-day-time { color: var(--poi-text-muted); }

/* --- Mobile: wider card with only a small edge gutter --- */
@media (max-width: 768px) {
    .poi-display-container { padding: 6px !important; }
    .poi-category-section  { margin-bottom: 16px; }

    /* Accordion rows get real left/right breathing room from the gray box */
    .poi-accordion-header { padding: 15px 16px !important; }
    .poi-accordion-body   { padding: 0 16px 20px 16px !important; }
    .poi-accordion-item   { border-radius: 12px; }

    /* Content panel: a touch tighter so the card feels roomy, not cramped */
    .poi-content-panel { padding: 18px 12px !important; }
}

@media (max-width: 480px) {
    .poi-display-container { padding: 5px !important; }
    .poi-content-panel     { padding: 16px 10px !important; }
    .poi-accordion-header  { padding: 14px 14px !important; }
    .poi-accordion-body    { padding: 0 14px 18px 14px !important; }
}

/* ==========================================================================
   NearbyVibe 1.4.6 — mobile: break out of theme wrapper padding to ~95vw
   On phones the surrounding theme (e.g. Betheme section + container) can add
   50px+ of side padding, leaving the cards at ~65% of the screen. Break out
   to 95% of the viewport, centered, with a small even gutter each side.
   ========================================================================== */
@media (max-width: 768px) {
    .poi-display-container {
        width: 95vw;
        max-width: 95vw;
        margin-left: 50%;
        transform: translateX(-50%);
        padding: 0 !important;
        box-sizing: border-box;
    }
    /* Cards fill the widened container; inner text padding stays comfortable */
    .poi-category-section { margin-bottom: 16px; }
    .poi-category-wrapper { width: 100%; }
}

/* ==========================================================================
   NearbyVibe 1.5.0 — Image viewer (lightbox) with swipe
   Click any place photo to open a fullscreen viewer; prev/next, keyboard,
   and swipe on mobile. Overlay is appended to <body> by the JS.
   ========================================================================== */

/* Cue that the photo is clickable */
.poi-location-image { cursor: zoom-in; }

body.poi-lightbox-lock { overflow: hidden; }

.poi-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}
.poi-lightbox.open { display: flex; }

.poi-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 16, 0.94);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.poi-lightbox-stage {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 92vw;
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.poi-lightbox-img {
    display: block;
    max-width: 92vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
    background: #000;
}

.poi-lightbox-caption {
    margin-top: 12px;
    color: #f3f4f6;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    max-width: 92vw;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

.poi-lightbox-close,
.poi-lightbox-nav {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}
.poi-lightbox-close:hover,
.poi-lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }
.poi-lightbox-close:active,
.poi-lightbox-nav:active { transform: scale(0.94); }

.poi-lightbox-close {
    top: 18px;
    right: 20px;
    width: 46px;
    height: 46px;
    font-size: 28px;
}

.poi-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    font-size: 22px;
}
.poi-lightbox-nav:active { transform: translateY(-50%) scale(0.94); }
.poi-lightbox-prev { left: 18px; }
.poi-lightbox-next { right: 18px; }

.poi-lightbox-counter {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.3px;
    background: rgba(0, 0, 0, 0.45);
    padding: 5px 14px;
    border-radius: 20px;
}

/* Phones: smaller controls, edge-to-edge image, no zoom cursor */
@media (max-width: 600px) {
    .poi-location-image { cursor: pointer; }
    .poi-lightbox-img { max-width: 96vw; max-height: 78vh; border-radius: 6px; }
    .poi-lightbox-stage { max-width: 96vw; }
    .poi-lightbox-close { top: 12px; right: 12px; width: 42px; height: 42px; font-size: 26px; }
    .poi-lightbox-nav { width: 42px; height: 42px; font-size: 19px; }
    .poi-lightbox-prev { left: 8px; }
    .poi-lightbox-next { right: 8px; }
    .poi-lightbox-caption { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .poi-lightbox-close, .poi-lightbox-nav { transition: none; }
}
