"use strict";(()=>{function S(v,m){let t=v==="dark",a=m?`#${m.replace(/^#/,"")}`:"#667eea",e=m?r(a,-10):"#5568d3",i={bg:t?"#1a1a1a":"#ffffff",fg:t?"#f5f5f5":"#111111",border:t?"#333333":"#e5e7eb",accent:a,accentHover:e,cardBg:t?"#2a2a2a":"#ffffff",muted:t?"#888888":"#666666",footerBg:t?"#1f1f1f":"#f9fafb"};function r(s,l){let h=parseInt(s.replace("#",""),16),c=Math.max(0,Math.min(255,(h>>16)+l)),d=Math.max(0,Math.min(255,(h>>8&255)+l)),n=Math.max(0,Math.min(255,(h&255)+l));return`#${(c<<16|d<<8|n).toString(16).padStart(6,"0")}`}return`
    /* ========================================
       RESETS & HOST - NO DEVICE-SPECIFIC STYLES
       ======================================== */
    :host {
      --sa-bg: ${i.bg};
      --sa-fg: ${i.fg};
      --sa-border: ${i.border};
      --sa-accent: ${i.accent};
      --sa-accent-hover: ${i.accentHover};
      --sa-card-bg: ${i.cardBg};
      --sa-muted: ${i.muted};
      --sa-footer-bg: ${i.footerBg};
      --sa-radius: 12px;
      --sa-shadow: 0 2px 8px rgba(0,0,0,0.1);
      
      display: block;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
      font-size: 14px;
      line-height: 1.5;
      color: var(--sa-fg);
      background: var(--sa-bg);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    .sa-widget { 
      padding: 1px;
      position: relative;
      overflow: visible;
    }
    .sa-section { margin-bottom: 32px; }

    /* ========================================
       MOBILE STYLES - ALL MOBILE IN ONE BLOCK
       ======================================== */
    @media (max-width: 768px) {
      /* Section Titles */
      .sa-section-title {
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 8px;
        color: var(--sa-fg);
        padding: 0 8px;
      }

      .sa-section-subtitle {
        font-size: 14px;
        color: var(--sa-muted);
        margin-bottom: 20px;
        line-height: 1.5;
        padding: 0 8px;
      }

      /* Search Bar */
      .sa-search-container {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--sa-bg);
        padding: 12px 8px 8px 8px;
        margin: 0 0 0 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      }

      .sa-search-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--sa-muted);
        pointer-events: none;
      }

      .sa-search-input {
        width: 100%;
        padding: 12px 44px 12px 44px;
        border: 2px solid var(--sa-border);
        border-radius: 12px;
        font-size: 15px;
        font-family: inherit;
        color: var(--sa-fg);
        background: var(--sa-bg);
        transition: all 0.2s ease;
        min-height: 44px;
      }

      .sa-search-input:focus {
        outline: none;
        border-color: var(--sa-accent);
        box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
      }

      .sa-search-clear {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        color: var(--sa-muted);
        transition: color 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .sa-search-clear:hover {
        color: var(--sa-fg);
      }

      /* Filter Container */
      .sa-filter-container {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 99;
        background: var(--sa-bg);
        padding: 8px;
        margin: 0 0 12px 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      }

      .sa-search-container + .sa-filter-container {
        top: 68px;
      }

      .sa-filter-scroll {
        gap: 6px;
        padding: 2px 0;
        max-height: none;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        flex-wrap: wrap;
      }

      .sa-filter-scroll::-webkit-scrollbar {
        display: none;
      }

      .sa-filter-chip {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 8px;
        min-height: 40px;
        background: #f7fafc !important;
        border: 2px solid #e2e8f0 !important;
        color: #4a5568 !important;
        cursor: pointer;
        font-weight: 600;
        transition: all 0.2s ease;
        white-space: nowrap;
        font-family: inherit;
      }

      .sa-filter-chip.sa-filter-active {
        background: var(--sa-accent) !important;
        border-color: var(--sa-accent) !important;
        color: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      }

      .sa-filter-chip.sa-filter-active .sa-filter-icon {
        filter: brightness(0) invert(1);
      }

      .sa-filter-chip.sa-filter-active .sa-filter-label {
        color: #ffffff !important;
      }

      .sa-filter-chip.sa-filter-hidden {
        display: none;
      }

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

      .sa-filter-label {
        font-size: 12px;
        color: inherit;
        line-height: 1;
        font-weight: 600;
      }

      .sa-more-filters-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-top: 8px;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        background: #ffffff;
        color: #4a5568;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        font-family: inherit;
      }

      .sa-more-filters-btn:hover {
        background: #f7fafc;
        border-color: #cbd5e0;
      }

      .sa-more-filters-btn svg {
        transition: transform 0.2s ease;
      }

      .sa-filter-expanded .sa-filter-scroll {
        max-height: none;
      }

      .sa-filter-expanded .sa-more-filters-btn svg {
        transform: rotate(180deg);
      }

      /* Results Count */
      .sa-results-count {
        font-size: 13px;
        color: var(--sa-muted);
        padding: 0 8px;
        margin-bottom: 12px;
        font-weight: 500;
      }

      /* Load More Button */
      .sa-load-more-container {
        display: flex;
        justify-content: center;
        margin-top: 20px;
        padding: 16px 8px;
        background: transparent;
      }

      .sa-load-more-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 8px;
        min-height: 44px;
        background: var(--sa-accent);
        color: white !important;
        border: none;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        font-family: inherit;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
      }

      .sa-load-more-btn:hover {
        background: var(--sa-accent-hover);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
      }

      .sa-load-more-btn:active {
        transform: translateY(0);
      }

      /* Grid Layout */
      .sa-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0;
        display: grid;
      }

      .sa-grid-carousel {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
      }

      .sa-grid-carousel::-webkit-scrollbar {
        display: none;
      }

      .sa-grid-carousel .sa-card {
        flex: 0 0 85%;
        scroll-snap-align: start;
      }

      /* Cards */
      .sa-card {
        display: flex;
        gap: 0;
        padding: 0;
        border-radius: 12px;
        min-height: 150px;
        overflow: hidden;
        background: var(--sa-card-bg);
        border: 1px solid var(--sa-border);
        transition: all 0.3s ease;
        cursor: pointer;
        animation: fadeIn 0.3s ease-out;
      }

      .sa-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        border-color: var(--sa-accent);
      }

      .sa-card:active {
        transform: translateY(0);
      }

      .sa-card-image-wrapper {
        position: relative;
        width: 130px;
        min-width: 130px;
        flex-shrink: 0;
        border-radius: 0;
        overflow: hidden;
      }

      .sa-card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transform: scale(1.01);
        transition: transform 0.2s ease;
        opacity: 1;
      }

      .sa-card:hover .sa-card-img {
        transform: scale(1.04);
      }

      .sa-card-body {
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex: 1;
        min-width: 0;
        padding: 10px 10px 0 10px;
      }

      .sa-card-header {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
      }

      .sa-badge-desktop {
        display: none;
      }

      .sa-badge-category {
        display: inline-block;
        background: var(--sa-accent);
        color: white;
        font-weight: 700;
        font-size: 9px;
        padding: 3px 7px;
        border-radius: 999px;
        white-space: nowrap;
        flex-shrink: 1;
        min-width: 0;
      }

      .sa-badge-review {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        background: rgba(245,158,11,0.1);
        color: #d97706;
        font-weight: 600;
        font-size: 11px;
        padding: 2px 5px;
        border-radius: 999px;
        white-space: nowrap;
        flex-shrink: 0;
      }

      .sa-badge-review-count {
        color: #a16207;
        font-size: 10px;
        font-weight: 500;
        display: inline;
      }

      .sa-star-icon {
        color: #f59e0b;
        fill: #f59e0b;
      }

      .sa-card-title {
        font-size: 14px;
        line-height: 1.35;
        font-weight: 600;
        color: var(--sa-fg);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 0;
        min-height: 38px;
      }

      .sa-stats-row {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: var(--sa-fg);
        flex-wrap: wrap;
        min-height: 18px;
      }

      .sa-stat-item {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        white-space: nowrap;
      }

      .sa-stat-rating {
        display: none;
      }

      .sa-stat-icon {
        width: 12px;
        height: 12px;
        opacity: 0.9;
        flex-shrink: 0;
      }

      .sa-ticket-icon {
        color: var(--sa-accent);
        fill: var(--sa-accent);
      }

      .sa-clock-icon {
        color: var(--sa-accent);
        stroke: var(--sa-accent);
      }

      .sa-stat-count {
        color: var(--sa-muted);
        font-size: 11px;
      }

      .sa-stat-separator {
        opacity: 0.5;
        margin: 0 2px;
      }

      /* Mobile: Supplier ABOVE footer */
      .sa-supplier-row {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 10px;
        color: var(--sa-muted);
        padding: 6px 0;
        margin: 0;
        line-height: 1;
        margin-top: auto;
      }

      .sa-card-footer {
        display: flex;
        align-items: flex-end;
        gap: 10px;
        padding: 8px 10px;
        background: var(--sa-footer-bg, #f9fafb);
        border-top: 1px solid var(--sa-border);
        margin: 0 -10px 0 -10px;
      }

      .sa-price-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0;
        flex-shrink: 0;
      }

      .sa-price-label {
        font-size: 10px;
        color: var(--sa-muted);
        font-weight: 500;
      }

      .sa-price-value {
        font-size: 13px;
        font-weight: 700;
        color: var(--sa-accent);
        line-height: 1;
      }

      .sa-btn-book {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 5px 12px;
        font-size: 11px;
        font-weight: 600;
        border-radius: 6px;
        min-height: 28px;
        margin-left: auto;
        background: var(--sa-accent);
        color: white;
        border: none;
        box-shadow: 0 1px 2px rgba(102,126,234,.2);
        transition: all 0.2s;
        cursor: pointer;
        font-family: inherit;
        white-space: nowrap;
      }

      .sa-btn-book:hover {
        box-shadow: 0 2px 4px rgba(102,126,234,.3);
      }

      .sa-building-icon {
        width: 10px;
        height: 10px;
        opacity: 0.85;
        flex-shrink: 0;
        color: var(--sa-muted);
        stroke: var(--sa-muted);
      }

      .sa-supplier-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        line-height: 1;
      }

      /* Gallery */
      .sa-gallery-prev,
      .sa-gallery-next {
        display: none;
      }

      .sa-gallery-indicator {
        position: absolute;
        bottom: 6px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 3px;
        padding: 4px 6px;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(8px);
        border-radius: 12px;
        opacity: 1;
        z-index: 3;
      }

      .sa-gallery-dot {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgba(255,255,255,0.5);
        transition: all 0.2s ease;
      }

      .sa-gallery-dot-active {
        background: white;
        width: 6px;
        height: 6px;
      }

      /* Skeleton */
      .sa-skeleton {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
      }

      .sa-skel-item {
        height: 150px !important;
        background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.8s ease-in-out infinite;
        border-radius: 12px;
        border: 1px solid #e5e7eb;
      }

      .sa-skel-title {
        height: 20px;
        width: 40%;
        background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.8s ease-in-out infinite;
        border-radius: 6px;
        margin-bottom: 12px;
      }

      /* Map */
      .sa-map-container {
        height: 300px;
        background: #f5f5f5;
        border-radius: 12px;
        margin-bottom: 20px;
        overflow: hidden;
        border: 1px solid var(--sa-border);
        position: relative;
        z-index: 1;
      }

      /* Widget Footer */
      .sa-footer {
        margin-top: 32px;
        padding: 16px 12px 12px;
        text-align: center;
        border-top: 2px solid var(--sa-border);
        background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.02));
      }

      .sa-powered {
        font-size: 12px;
        color: var(--sa-muted);
        margin-bottom: 4px;
      }

      .sa-powered-link {
        color: var(--sa-accent);
        font-weight: 700;
        text-decoration: none;
        transition: all 0.2s;
        border-bottom: 1px solid transparent;
      }

      .sa-powered-link:hover {
        border-bottom-color: var(--sa-accent);
      }

      .sa-powered-tagline {
        font-size: 10px;
        color: var(--sa-muted);
        font-style: italic;
        opacity: 0.8;
      }

      /* Error/Empty States */
      .sa-error {
        text-align: center;
        padding: 32px 16px;
      }

      .sa-error p {
        margin-bottom: 12px;
        color: var(--sa-muted);
        font-size: 14px;
      }

      .sa-btn-retry {
        padding: 10px 20px;
        background: var(--sa-accent);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        font-size: 14px;
      }

      .sa-btn-retry:hover {
        background: var(--sa-accent-hover);
      }

      .sa-empty {
        text-align: center;
        padding: 32px;
        color: var(--sa-muted);
        font-size: 14px;
      }

      .sa-skeleton-message {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 32px 16px;
        gap: 12px;
      }

      .sa-loading-text {
        font-size: 14px;
        color: var(--sa-muted);
        font-weight: 500;
      }
    }

    /* ========================================
       DESKTOP STYLES - ALL DESKTOP IN ONE BLOCK
       ======================================== */
    @media (min-width: 769px) {
      /* Section Titles */
      .sa-section-title {
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 8px;
        color: var(--sa-fg);
      }

      .sa-section-subtitle {
        font-size: 15px;
        color: var(--sa-muted);
        margin-bottom: 20px;
        line-height: 1.5;
      }

      /* Search Bar */
      .sa-search-container {
        position: relative;
        margin-bottom: 20px;
      }

      .sa-search-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--sa-muted);
        pointer-events: none;
      }

      .sa-search-input {
        width: 100%;
        padding: 12px 44px 12px 44px;
        border: 2px solid var(--sa-border);
        border-radius: 12px;
        font-size: 15px;
        font-family: inherit;
        color: var(--sa-fg);
        background: var(--sa-bg);
        transition: all 0.2s ease;
        min-height: 44px;
      }

      .sa-search-input:focus {
        outline: none;
        border-color: var(--sa-accent);
        box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.1);
      }

      .sa-search-clear {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px;
        color: var(--sa-muted);
        transition: color 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .sa-search-clear:hover {
        color: var(--sa-fg);
      }

      /* Filter Container */
      .sa-filter-container {
        margin-bottom: 20px;
        position: relative;
      }

      .sa-filter-scroll {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 4px 0;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        flex-wrap: wrap;
        max-height: 96px;
        transition: max-height 0.3s ease;
      }

      .sa-filter-scroll::-webkit-scrollbar {
        display: none;
      }

      .sa-filter-expanded .sa-filter-scroll {
        max-height: none;
      }

      .sa-filter-chip {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 10px 18px;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        background: #ffffff;
        color: #4a5568;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        white-space: nowrap;
        font-family: inherit;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
      }

      .sa-filter-chip:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
        border-color: #cbd5e0;
      }

      .sa-filter-chip.sa-filter-active {
        background: var(--sa-accent) !important;
        border-color: var(--sa-accent) !important;
        color: white !important;
        font-weight: 700;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        transform: translateY(-1px);
      }

      .sa-filter-chip.sa-filter-active:hover {
        background: var(--sa-accent-hover) !important;
        border-color: var(--sa-accent-hover) !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
      }

      .sa-filter-chip.sa-filter-active .sa-filter-icon,
      .sa-filter-chip.sa-filter-active .sa-filter-label {
        color: white !important;
      }

      .sa-filter-chip.sa-filter-hidden {
        display: none;
      }

      .sa-filter-icon {
        font-size: 20px;
        line-height: 1;
        flex-shrink: 0;
      }

      .sa-filter-label {
        font-size: 14px;
        line-height: 1;
        font-weight: 600;
        text-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
      }

      .sa-more-filters-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        margin-top: 8px;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        background: #ffffff;
        color: #4a5568;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        font-family: inherit;
      }

      .sa-more-filters-btn:hover {
        background: #f7fafc;
        border-color: #cbd5e0;
      }

      .sa-more-filters-btn svg {
        transition: transform 0.2s ease;
      }

      .sa-filter-expanded .sa-more-filters-btn svg {
        transform: rotate(180deg);
      }

      /* Results Count */
      .sa-results-count {
        font-size: 14px;
        color: var(--sa-muted);
        margin-bottom: 16px;
        font-weight: 500;
      }

      /* Load More Button */
      .sa-load-more-container {
        display: flex;
        justify-content: center;
        margin-top: 32px;
        padding: 20px 0;
        background: transparent;
      }

      .sa-load-more-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 14px 32px;
        background: var(--sa-accent);
        color: white !important;
        border: none;
        border-radius: 12px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        font-family: inherit;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
      }

      .sa-load-more-btn:hover {
        background: var(--sa-accent-hover);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
      }

      .sa-load-more-btn:active {
        transform: translateY(0);
      }

      /* Grid Layout */
      .sa-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
      }

      /* Carousel Container */
      .sa-carousel-wrapper {
        position: relative;
      }

      .sa-grid-carousel {
        display: flex;
        overflow-x: auto;
        gap: 20px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
        padding: 8px 0;
        margin: 0 -4px;
        padding-left: 4px;
        padding-right: 4px;
      }

      .sa-grid-carousel::-webkit-scrollbar {
        display: none;
      }

      .sa-grid-carousel .sa-card {
        flex: 0 0 320px;
        scroll-snap-align: start;
      }

      /* Carousel Navigation Buttons */
      .sa-carousel-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        color: #333;
        z-index: 10;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transition: all 0.2s ease;
        opacity: 0;
      }

      .sa-carousel-wrapper:hover .sa-carousel-nav {
        opacity: 1;
      }

      .sa-carousel-nav:hover {
        background: #f8f9fa;
        transform: translateY(-50%) scale(1.08);
        box-shadow: 0 6px 20px rgba(0,0,0,0.2);
      }

      .sa-carousel-nav:active {
        transform: translateY(-50%) scale(0.95);
      }

      .sa-carousel-nav:disabled {
        opacity: 0.3;
        cursor: not-allowed;
        transform: translateY(-50%);
      }

      .sa-carousel-nav-prev {
        left: -24px;
      }

      .sa-carousel-nav-next {
        right: -24px;
      }

      /* Fade edges to indicate scrollable content */
      .sa-carousel-wrapper::before,
      .sa-carousel-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 60px;
        pointer-events: none;
        z-index: 5;
        opacity: 0;
        transition: opacity 0.3s ease;
      }

      .sa-carousel-wrapper::before {
        left: 0;
        background: linear-gradient(to right, var(--sa-bg, #fff) 0%, transparent 100%);
      }

      .sa-carousel-wrapper::after {
        right: 0;
        background: linear-gradient(to left, var(--sa-bg, #fff) 0%, transparent 100%);
      }

      .sa-carousel-wrapper.has-scroll-left::before {
        opacity: 1;
      }

      .sa-carousel-wrapper.has-scroll-right::after {
        opacity: 1;
      }

      /* Progress dots for carousel */
      .sa-carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
        padding: 8px 0;
      }

      .sa-carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--sa-border);
        border: none;
        padding: 0;
        cursor: pointer;
        transition: all 0.2s ease;
      }

      .sa-carousel-dot:hover {
        background: var(--sa-muted);
        transform: scale(1.2);
      }

      .sa-carousel-dot.active {
        background: var(--sa-accent);
        width: 24px;
        border-radius: 4px;
      }

      /* Cards */
      .sa-card {
        display: flex;
        flex-direction: column;
        background: var(--sa-card-bg);
        border: 1px solid var(--sa-border);
        border-radius: var(--sa-radius);
        overflow: hidden;
        transition: all 0.3s ease;
        cursor: pointer;
        animation: fadeIn 0.3s ease-out;
      }

      .sa-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0,0,0,0.12);
        border-color: var(--sa-accent);
      }

      .sa-card:active {
        transform: translateY(-2px);
      }

      .sa-card-image-wrapper {
        position: relative;
        width: 100%;
        overflow: hidden;
      }

      .sa-card-img {
        width: 100%;
        height: 200px;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease, opacity 0.2s ease;
        opacity: 1;
      }

      .sa-card:hover .sa-card-img {
        transform: scale(1.05);
      }

      .sa-card-body {
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        flex: 1;
        min-height: 0;
      }

      .sa-card-header {
        display: none;
      }

      .sa-badge-review {
        display: none;
      }

      .sa-badge-desktop {
        display: inline-block;
        position: absolute;
        top: 8px;
        left: 8px;
        background: rgba(0,0,0,0.75);
        backdrop-filter: blur(8px);
        color: white;
        font-size: 10px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        z-index: 2;
      }

      .sa-badge-category {
        display: inline-block;
        position: absolute;
        top: 8px;
        left: 8px;
        background: rgba(0,0,0,0.75);
        backdrop-filter: blur(8px);
        color: white;
        font-size: 10px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        z-index: 2;
      }

      .sa-card-title {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.35;
        color: var(--sa-fg);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        height: 44px;
        margin-bottom: 8px;
      }

      .sa-stats-row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        font-size: 12px;
        color: var(--sa-muted);
        margin-bottom: 6px;
      }

      .sa-stat-item {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        color: var(--sa-fg);
        font-size: 12px;
        line-height: 1;
      }

      .sa-stat-rating {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        color: var(--sa-fg);
        font-weight: 600;
      }

      .sa-stat-icon {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
      }

      .sa-star-icon {
        color: #FFC107;
        fill: #FFC107;
        width: 12px;
        height: 12px;
      }

      .sa-ticket-icon {
        color: #6b7280;
        fill: #6b7280;
      }

      .sa-clock-icon {
        color: #6b7280;
        stroke: #6b7280;
      }

      .sa-stat-item strong {
        font-weight: 700;
        font-size: 12px;
        line-height: 1;
      }

      .sa-stat-count {
        color: var(--sa-muted);
        font-size: 12px;
        line-height: 1;
      }

      .sa-badge-review-count {
        display: inline;
        color: var(--sa-muted);
        font-size: 11px;
        font-weight: 500;
      }

      .sa-stat-separator {
        color: #d1d5db;
        user-select: none;
        font-weight: 400;
        margin: 0 2px;
        font-size: 12px;
      }

      .sa-supplier-row {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: var(--sa-muted);
        line-height: 1;
      }

      .sa-building-icon {
        flex-shrink: 0;
        width: 14px;
        height: 14px;
        color: var(--sa-muted);
        stroke: var(--sa-muted);
      }

      .sa-supplier-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
        line-height: 1;
      }

      .sa-card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: auto;
        padding: 12px 16px;
        margin-left: -16px;
        margin-right: -16px;
        margin-bottom: -16px;
        background: var(--sa-footer-bg, #f9fafb);
        border-top: 1px solid var(--sa-border);
      }

      .sa-price-wrapper {
        display: flex;
        flex-direction: column;
        gap: 2px;
      }

      .sa-price-label {
        font-size: 11px;
        color: var(--sa-muted);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.3px;
      }

      .sa-price-value {
        font-size: 22px;
        font-weight: 800;
        color: var(--sa-accent);
        line-height: 1;
      }

      .sa-btn-book {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 24px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s;
        font-family: inherit;
        white-space: nowrap;
        background: var(--sa-accent);
        color: white;
        border: none;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      }

      .sa-btn-book:hover {
        opacity: 0.9;
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.2);
      }

      .sa-btn-book:active {
        transform: translateY(0);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      }

      .sa-btn-book-sm {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 14px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
        transition: all 0.2s;
        font-family: inherit;
        white-space: nowrap;
      }

      .sa-btn-book-sm:hover {
        opacity: 0.85;
      }

      .sa-btn-book-xs {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 4px 10px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 12px;
        cursor: pointer;
        transition: all 0.2s;
        font-family: inherit;
        white-space: nowrap;
      }

      .sa-btn-book-xs:hover {
        opacity: 0.85;
      }

      /* Gallery */
      .sa-gallery-prev,
      .sa-gallery-next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.95);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        color: #333;
        transition: all 0.25s;
        opacity: 0;
        z-index: 3;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      }

      .sa-gallery-prev {
        left: 8px;
      }

      .sa-gallery-next {
        right: 8px;
      }

      .sa-card:hover .sa-gallery-prev,
      .sa-card:hover .sa-gallery-next {
        opacity: 1;
      }

      .sa-gallery-prev:hover,
      .sa-gallery-next:hover {
        background: white;
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
      }

      .sa-gallery-prev:active,
      .sa-gallery-next:active {
        transform: translateY(-50%) scale(0.95);
      }

      .sa-gallery-indicator {
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 4px;
        padding: 6px 8px;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(8px);
        border-radius: 12px;
        opacity: 0;
        transition: opacity 0.2s;
        z-index: 3;
      }

      .sa-card:hover .sa-gallery-indicator {
        opacity: 1;
      }

      .sa-gallery-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(255,255,255,0.5);
        transition: all 0.3s ease;
      }

      .sa-gallery-dot-active {
        width: 18px;
        border-radius: 3px;
        background: rgba(255,255,255,0.95);
      }

      /* Skeleton */
      .sa-skeleton {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
      }

      .sa-skel-item {
        height: 320px;
        background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.8s ease-in-out infinite;
        border-radius: var(--sa-radius);
        border: 1px solid #e5e7eb;
      }

      .sa-skel-title {
        height: 24px;
        width: 40%;
        background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.8s ease-in-out infinite;
        border-radius: 6px;
        margin-bottom: 16px;
      }

      /* Map */
      .sa-map-container {
        height: 450px;
        background: #f5f5f5;
        border-radius: var(--sa-radius);
        margin-bottom: 20px;
        overflow: hidden;
        border: 1px solid var(--sa-border);
        position: relative;
        z-index: 1;
      }

      /* Widget Footer */
      .sa-footer {
        margin-top: 40px;
        padding: 20px 16px 16px;
        text-align: center;
        border-top: 2px solid var(--sa-border);
        background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.02));
      }

      .sa-powered {
        font-size: 13px;
        color: var(--sa-muted);
        margin-bottom: 6px;
      }

      .sa-powered-link {
        color: var(--sa-accent);
        font-weight: 700;
        text-decoration: none;
        transition: all 0.2s;
        border-bottom: 1px solid transparent;
      }

      .sa-powered-link:hover {
        border-bottom-color: var(--sa-accent);
      }

      .sa-powered-tagline {
        font-size: 11px;
        color: var(--sa-muted);
        font-style: italic;
        opacity: 0.8;
      }

      /* Error/Empty States */
      .sa-error {
        text-align: center;
        padding: 40px 20px;
      }

      .sa-error p {
        margin-bottom: 16px;
        color: var(--sa-muted);
      }

      .sa-btn {
        display: inline-flex;
        align-items: center;
        padding: 10px 20px;
        background: var(--sa-accent);
        color: #fff;
        text-decoration: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 14px;
        transition: background 0.2s;
        border: none;
        cursor: pointer;
      }

      .sa-btn:hover, .sa-btn:focus {
        background: var(--sa-accent-hover);
        outline: 2px solid var(--sa-accent);
        outline-offset: 2px;
      }

      .sa-btn-retry {
        padding: 10px 20px;
        background: var(--sa-accent);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        font-size: 14px;
      }

      .sa-btn-retry:hover {
        background: var(--sa-accent-hover);
      }

      .sa-empty {
        text-align: center;
        padding: 40px;
        color: var(--sa-muted);
      }

      .sa-skeleton-message {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px 20px;
        gap: 16px;
      }

      .sa-loading-text {
        font-size: 15px;
        color: var(--sa-muted);
        font-weight: 500;
      }
    }

    /* ========================================
       SHARED UTILITIES (Device-agnostic)
       ======================================== */
    
    /* Leaflet Map Styles */
    .leaflet-container {
      width: 100%;
      height: 100%;
      font-family: inherit;
    }

    .leaflet-pane,
    .leaflet-tile,
    .leaflet-marker-icon,
    .leaflet-marker-shadow,
    .leaflet-tile-container,
    .leaflet-pane > svg,
    .leaflet-pane > canvas,
    .leaflet-zoom-box,
    .leaflet-image-layer,
    .leaflet-layer {
      position: absolute;
      left: 0;
      top: 0;
    }

    .leaflet-control {
      position: relative;
      z-index: 800;
      pointer-events: visiblePainted;
      pointer-events: auto;
      float: left;
      clear: both;
    }

    .leaflet-top,
    .leaflet-bottom {
      position: absolute;
      z-index: 1000;
      pointer-events: none;
    }

    .leaflet-top { top: 0; }
    .leaflet-right { right: 0; }
    .leaflet-bottom { bottom: 0; }
    .leaflet-left { left: 0; }

    .leaflet-right .leaflet-control {
      float: right;
    }

    .leaflet-top .leaflet-control {
      margin-top: 10px;
    }

    .leaflet-bottom .leaflet-control {
      margin-bottom: 10px;
    }

    .leaflet-left .leaflet-control {
      margin-left: 10px;
    }

    .leaflet-right .leaflet-control {
      margin-right: 10px;
    }

    .leaflet-control-zoom-in,
    .leaflet-control-zoom-out {
      font: bold 18px 'Lucida Console', Monaco, monospace;
      text-indent: 1px;
    }

    .leaflet-touch .leaflet-control-zoom-in, 
    .leaflet-touch .leaflet-control-zoom-out {
      font-size: 22px;
    }

    .leaflet-popup {
      position: absolute;
      text-align: center;
      margin-bottom: 20px;
    }

    .leaflet-popup-content-wrapper {
      padding: 1px;
      text-align: left;
      border-radius: 12px;
      background: white;
      box-shadow: 0 3px 14px rgba(0,0,0,0.4);
    }

    .leaflet-popup-content {
      margin: 13px 19px;
      line-height: 1.4;
    }

    .leaflet-popup-tip-container {
      width: 40px;
      height: 20px;
      position: absolute;
      left: 50%;
      margin-left: -20px;
      overflow: hidden;
      pointer-events: none;
    }

    .leaflet-popup-tip {
      width: 17px;
      height: 17px;
      padding: 1px;
      margin: -10px auto 0;
      transform: rotate(45deg);
      background: white;
      box-shadow: 0 3px 14px rgba(0,0,0,0.4);
    }

    .leaflet-container a.leaflet-popup-close-button {
      position: absolute;
      top: 0;
      right: 0;
      padding: 4px 4px 0 0;
      border: none;
      text-align: center;
      width: 24px;
      height: 24px;
      font: 18px/24px Tahoma, Verdana, sans-serif;
      color: #757575;
      text-decoration: none;
      background: transparent;
    }

    .leaflet-container a.leaflet-popup-close-button:hover,
    .leaflet-container a.leaflet-popup-close-button:focus {
      color: #585858;
    }

    /* Map placeholders */
    .sa-map-placeholder {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 100%;
      color: var(--sa-muted);
      text-align: center;
    }

    .sa-map-placeholder svg {
      margin-bottom: 12px;
      opacity: 0.5;
    }

    .sa-map-placeholder p {
      font-size: 18px;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .sa-map-hint {
      font-size: 14px !important;
      opacity: 0.7;
    }

    .sa-map-activities {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 16px;
    }

    .sa-map-card {
      display: flex;
      gap: 12px;
      background: var(--sa-card-bg);
      border: 1px solid var(--sa-border);
      border-radius: var(--sa-radius);
      padding: 12px;
      transition: box-shadow 0.2s;
    }

    .sa-map-card:hover {
      box-shadow: var(--sa-shadow);
    }

    .sa-map-card-img {
      width: 120px;
      height: 80px;
      object-fit: cover;
      border-radius: 8px;
      flex-shrink: 0;
    }

    .sa-map-card-body {
      flex: 1;
      min-width: 0;
    }

    .sa-map-card-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 4px;
      color: var(--sa-fg);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .sa-map-card-location {
      font-size: 12px;
      color: var(--sa-muted);
      margin-bottom: 6px;
    }

    .sa-map-card-meta {
      display: flex;
      gap: 8px;
      margin-bottom: 8px;
      font-size: 11px;
    }

    .sa-meta-mini {
      display: inline-flex;
      align-items: center;
      gap: 2px;
      color: var(--sa-muted);
      font-size: 11px;
    }

    .sa-map-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-top: 8px;
    }

    .sa-price-sm {
      font-size: 14px;
      font-weight: 700;
      color: var(--sa-accent);
    }

    /* Carousel (deprecated for widget, but keep for compatibility) */
    .sa-carousel {
      overflow-x: auto;
      overflow-y: hidden;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: thin;
    }

    .sa-carousel-track {
      display: flex;
      gap: 16px;
      padding-bottom: 10px;
    }

    .sa-carousel-item {
      flex: 0 0 280px;
      background: var(--sa-card-bg);
      border: 1px solid var(--sa-border);
      border-radius: var(--sa-radius);
      overflow: hidden;
      transition: all 0.3s ease;
      cursor: pointer;
    }

    .sa-carousel-item:hover {
      transform: translateY(-3px);
      box-shadow: 0 8px 16px rgba(0,0,0,0.12);
      border-color: var(--sa-accent);
    }

    .sa-carousel-image-wrapper {
      position: relative;
      overflow: hidden;
    }

    .sa-carousel-img {
      width: 100%;
      height: 160px;
      object-fit: cover;
      display: block;
      transition: transform 0.3s ease;
    }

    .sa-carousel-item:hover .sa-carousel-img {
      transform: scale(1.05);
    }

    .sa-carousel-body {
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .sa-carousel-stats {
      display: flex;
      gap: 12px;
      align-items: center;
      font-size: 12px;
      padding-top: 6px;
      border-top: 1px solid var(--sa-border);
    }

    .sa-price-value-sm {
      font-size: 18px;
      font-weight: 800;
      color: var(--sa-accent);
      line-height: 1;
    }

    .sa-carousel-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 6px;
      color: var(--sa-fg);
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      white-space: normal;
    }

    .sa-carousel-category {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      color: var(--sa-muted);
      letter-spacing: 0.5px;
      margin-bottom: 4px;
    }

    .sa-carousel-supplier {
      font-size: 11px;
      color: var(--sa-muted);
      margin-bottom: 4px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .sa-carousel-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 8px;
      font-size: 11px;
    }

    .sa-carousel-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    /* Spinner (shared) */
    .sa-spinner {
      animation: spin 1s linear infinite;
    }

    .sa-spinner-track {
      stroke: #e5e7eb;
    }

    .sa-spinner-head {
      stroke: var(--sa-accent, #0a84ff);
      stroke-linecap: round;
      stroke-dasharray: 50;
      stroke-dashoffset: 0;
      animation: dash 1.5s ease-in-out infinite;
      transform-origin: center;
    }

    /* ========================================
       ANIMATIONS - Device-agnostic
       ======================================== */
    .sa-section {
      animation: fadeInUp 0.4s ease-out;
    }

    .sa-section-progressive {
      animation: fadeInUpProgressive 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes fadeInUpProgressive {
      from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    @keyframes spin {
      100% { transform: rotate(360deg); }
    }

    @keyframes dash {
      0% { stroke-dashoffset: 50; }
      50% { stroke-dashoffset: 12.5; }
      100% { stroke-dashoffset: 50; }
    }

    /* Stagger cards */
    .sa-card:nth-child(1) { animation-delay: 0ms; }
    .sa-card:nth-child(2) { animation-delay: 50ms; }
    .sa-card:nth-child(3) { animation-delay: 100ms; }
    .sa-card:nth-child(4) { animation-delay: 150ms; }
    .sa-card:nth-child(5) { animation-delay: 200ms; }
    .sa-card:nth-child(6) { animation-delay: 250ms; }
  `}var p=v=>String(v).replace(/[&<>"']/g,m=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[m]||m);var M={wandern:"\u{1F97E}",hiking:"\u{1F97E}",paragliding:"\u{1FA82}",gleitschirmfliegen:"\u{1FA82}",fallschirmspringen:"\u{1FA82}",bergbahnen:"\u{1F6A1}","cable car":"\u{1F6A1}",seilbahn:"\u{1F6A1}",skiing:"\u26F7\uFE0F",skifahren:"\u26F7\uFE0F",ski:"\u26F7\uFE0F",skischule:"\u26F7\uFE0F",skiticket:"\u26F7\uFE0F",snowboarding:"\u{1F3C2}",snowboard:"\u{1F3C2}",schlitteln:"\u{1F6F7}",sledding:"\u{1F6F7}",bobfahren:"\u{1F6F7}","schlitteln und bobfahren":"\u{1F6F7}",rafting:"\u{1F6F6}","boat trips":"\u26F5",schifffahrt:"\u26F5",boot:"\u26F5",canyoning:"\u{1F30A}",klettern:"\u{1F9D7}\u200D\u2642\uFE0F",climbing:"\u{1F9D7}\u200D\u2642\uFE0F",seilpark:"\u{1F332}",hochseilgarten:"\u{1F332}",bike:"\u{1F6B5}",velo:"\u{1F6B5}","e-bike":"\u{1F6B5}\u200D\u2642\uFE0F",mountainbike:"\u{1F6B5}",wellness:"\u{1F486}",spa:"\u{1F486}","wellness und erlebnisb\xE4der":"\u{1F486}",erlebnisbad:"\u{1F3CA}","essen & trinken":"\u{1F37D}\uFE0F","food & drink":"\u{1F37D}\uFE0F",brunch:"\u{1F950}",dinner:"\u{1F37D}\uFE0F","touristische bahnp\xE4sse":"\u{1F3AB}",passes:"\u{1F3AB}",tickets:"\u{1F3AB}",bahnticket:"\u{1F682}",naturattraktionen:"\u{1F3D4}\uFE0F",nature:"\u{1F3D4}\uFE0F",sightseeing:"\u{1F4F8}",reisevorbereitung:"\u{1F9F3}","virtuelle reisebegleitung":"\u{1F4BB}",sommerrodeln:"\u{1F6DD}",tyrolienne:"\u{1F3A2}",zipline:"\u{1F3A2}",default:"\u{1F3AF}"},C=v=>{let m=v.toLowerCase().trim();return M[m]||M.default},L=class extends HTMLElement{constructor(){super();this.a={loading:!0,data:null,error:null};this.u=!1;this.c=new Map;this.p=new Map;this.b=0;this.d=0;this.r="";this.t=[];this.x=[];this.g=null;this.f=!1;this.i=16;this.s=!1;this.o=!1;this.e=this.attachShadow({mode:"open"})}static get observedAttributes(){return["widget-id","locale","theme","api-url"]}connectedCallback(){this.parseURLParameters(),this.render(),this.h=window.setTimeout(()=>this.load(),0)}disconnectedCallback(){var t;(t=this.n)==null||t.abort(),this.h&&clearTimeout(this.h)}attributeChangedCallback(t,a,e){a!==e&&this.isConnected&&this.f&&this.load()}get config(){return{widgetId:this.getAttribute("widget-id")||"",locale:this.getAttribute("locale")||"de-CH",theme:this.getAttribute("theme")||"light",apiUrl:this.getAttribute("api-url")||"https://widget.swissactivities.com"}}deferredScriptLoad(){return this.l?this.l:this.u||window.m?Promise.resolve():(this.l=(async()=>{let t=["https://swissactivities.com/widget.js"];await Promise.all(t.map(a=>new Promise((e,i)=>{if(document.querySelector(`script[src="${a}"]`)){e();return}let r=document.createElement("script");r.src=a,r.async=!0,r.onload=()=>e(),r.onerror=()=>i(new Error(`Failed to load ${a}`)),document.head.appendChild(r)}))),this.u=!0,window.m=!0,await new Promise(a=>setTimeout(a,100))})(),this.l)}waitForFrame(){return new Promise(t=>requestAnimationFrame(()=>t()))}updateGalleryDots(t,a,e){let i=this.e.querySelector(`[data-gallery-indicator="${t}"]`);if(!i)return;let r=Array.from({length:Math.min(e,5)},(s,l)=>`<span class="sa-gallery-dot ${l===a?"sa-gallery-dot-active":""}"></span>`).join("");i.innerHTML=r}showBookingOverlay(){let t=document.getElementById("sa-booking-overlay");t&&t.remove();let a=this.config.locale||"de-CH",e=a.startsWith("de")?"Buchung wird geladen...":a.startsWith("fr")?"Chargement de la r\xE9servation...":a.startsWith("it")?"Caricamento prenotazione...":"Loading booking...",i=a.startsWith("de")?"Schlie\xDFen":a.startsWith("fr")?"Fermer":a.startsWith("it")?"Chiudi":"Close",r=document.createElement("div");r.id="sa-booking-overlay",r.className="sa-booking-overlay",r.innerHTML=`
      <div class="sa-overlay-backdrop"></div>
      <div class="sa-overlay-content">
        <div class="sa-overlay-spinner">
          <svg viewBox="0 0 50 50" width="50" height="50">
            <circle cx="25" cy="25" r="20" fill="none" stroke="#e5e7eb" stroke-width="3"/>
            <circle cx="25" cy="25" r="20" fill="none" stroke="#667eea" stroke-width="3" 
                    stroke-linecap="round" class="sa-spinner-circle"/>
          </svg>
        </div>
        <div class="sa-overlay-progress">
          <div class="sa-overlay-progress-bar"></div>
        </div>
      </div>
    `,document.body.appendChild(r);let s=setTimeout(()=>{document.getElementById("sa-booking-overlay")&&(r.classList.add("sa-overlay-closing"),setTimeout(()=>r.remove(),200))},1500),l=new MutationObserver(h=>{h.forEach(c=>{c.addedNodes.forEach(d=>{if(d.nodeType===1){let n=d;n.matches&&(n.matches("[data-drawer]")||n.matches("swiss-activities-widget")||n.querySelector("[data-drawer]"))&&(clearTimeout(s),l.disconnect(),r.classList.add("sa-overlay-closing"),setTimeout(()=>r.remove(),200))}})})});l.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>l.disconnect(),2e3)}parseURLParameters(){if(typeof window>"u")return;let t=new URLSearchParams(window.location.search),a=t.get("type"),e=t.get("search");a&&(this.t=[a]),e&&(this.r=e)}updateURLParameters(){if(typeof window>"u")return;let t=new URLSearchParams(window.location.search);this.t.length>0?t.set("type",this.t[0]):t.delete("type"),this.r.trim()?t.set("search",this.r.trim()):t.delete("search");let a=t.toString(),e=a?`${window.location.pathname}?${a}`:window.location.pathname;window.history.replaceState({},"",e)}filterActivities(t){let a=t;if(this.t.length>0&&(a=a.filter(e=>this.t.some(i=>{var r;return(r=e.subtitle)==null?void 0:r.toLowerCase().includes(i.toLowerCase())}))),this.r.trim()){let e=this.r.toLowerCase();a=a.filter(i=>{var r,s,l;return i.title.toLowerCase().includes(e)||((r=i.supplier)==null?void 0:r.toLowerCase().includes(e))||((s=i.location)==null?void 0:s.toLowerCase().includes(e))||((l=i.subtitle)==null?void 0:l.toLowerCase().includes(e))})}return a}renderSearchBar(t){return`
      <div class="sa-search-container">
        <svg class="sa-search-icon" viewBox="0 0 24 24" width="20" height="20" fill="none" stroke="currentColor" stroke-width="2">
          <circle cx="11" cy="11" r="8"/>
          <path d="m21 21-4.35-4.35"/>
        </svg>
        <input 
          type="search" 
          class="sa-search-input" 
          placeholder="${t.startsWith("de")?"Aktivit\xE4ten suchen...":t.startsWith("fr")?"Rechercher des activit\xE9s...":t.startsWith("it")?"Cerca attivit\xE0...":"Search activities..."}"
          value="${p(this.r)}"
          id="sa-search-input"
        />
        ${this.r?`
          <button class="sa-search-clear" id="sa-search-clear" aria-label="Clear search">
            <svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor">
              <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
            </svg>
          </button>
        `:""}
      </div>
    `}renderTypeFilters(t,a){let e=a.startsWith("de")?"Alle":a.startsWith("fr")?"Tous":a.startsWith("it")?"Tutti":"All",i=a.startsWith("de")?"Mehr Filter":a.startsWith("fr")?"Plus de filtres":a.startsWith("it")?"Altri filtri":"More filters",r=a.startsWith("de")?"Weniger Filter":a.startsWith("fr")?"Moins de filtres":a.startsWith("it")?"Meno filtri":"Less filters",s=this.t.length===0,l=this.o?r:i;return`
      <div class="sa-filter-container ${this.o?"sa-filter-expanded":""}">
        <div class="sa-filter-scroll">
          <button 
            class="sa-filter-chip ${s?"sa-filter-active":""}" 
            data-filter-type="all"
          >
            ${e}
          </button>
          ${t.map((h,c)=>{let d=C(h),n=this.t.includes(h),g=c>=3&&!this.o&&!n;return`
              <button 
                class="sa-filter-chip ${n?"sa-filter-active":""} ${g?"sa-filter-hidden":""}" 
                data-filter-type="${p(h)}"
              >
                <span class="sa-filter-icon">${d}</span>
                <span class="sa-filter-label">${p(h)}</span>
              </button>
            `}).join("")}
        </div>
        ${t.length>3?`
          <button class="sa-more-filters-btn" id="sa-more-filters">
            ${l}
            <svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2">
              <path d="M19 9l-7 7-7-7"/>
            </svg>
          </button>
        `:""}
      </div>
    `}async load(){var r,s;let{widgetId:t,locale:a,apiUrl:e}=this.config;if(!t){this.a={loading:!1,data:null,error:new Error("widget-id required")},this.render();return}(r=this.n)==null||r.abort(),this.n=new AbortController,this.a.loading=!0,this.b=0,this.d=0,this.render();let i=performance.now();try{let l=`${e}/api/widgets/${encodeURIComponent(t)}?locale=${encodeURIComponent(a)}&format=v2`,h=performance.now(),c=await fetch(l,{signal:this.n.signal,credentials:"omit",mode:"cors",headers:{Accept:"application/json"}});if(!c.ok)throw new Error(`HTTP ${c.status}`);let d=await c.json(),n=d.data||d,g=performance.now()-h;(s=n==null?void 0:n.sections)==null||s.length,n!=null&&n.affiliate_id,d.source,`${g.toFixed(0)}`,this.a.data=n,this.a.error=null,await this.renderProgressively(n),this.a.loading=!1,this.attachEventHandlers(),`${(performance.now()-i).toFixed(0)}`,this.f=!0}catch(l){if(l instanceof Error&&l.name==="AbortError")return;this.a={loading:!1,data:null,error:l instanceof Error?l:new Error("Unknown error")},this.render(),this.f=!0}}async renderProgressively(t){let{sections:a,template_type:e}=t;if(!a||a.length===0){this.a.loading=!1,this.render();return}this.d=a.length,`${this.d}`,this.renderProgressiveContainer(t);for(let i=0;i<a.length;i++){let r=a[i],s=performance.now();this.renderSingleSection(r,i,t),this.b++;let l=performance.now()-s;i+1,`${this.d}${l.toFixed(0)}`,i<a.length-1&&(await this.waitForFrame(),await new Promise(h=>setTimeout(h,200)))}this.addFooter(),t.template_type==="map"&&setTimeout(()=>this.initializeLeafletMap(),100)}renderProgressiveContainer(t){let{theme:a}=this.config,e=this.getStyles(a);this.e.innerHTML=`
      <style>${e}</style>
      <div class="sa-widget" id="sa-progressive-widget">
        <div id="sa-sections-container"></div>
      </div>
    `}renderSingleSection(t,a,e){let i=this.e.getElementById("sa-sections-container");if(!i)return;let r=t.activities||[],s=e.locale||"de-CH",l=this.filterActivities(r);this.s=this.r.length>0||this.t.length>0;let h=a>0?'style="margin-top: 48px;"':"",c="";if(a===0&&(e.show_text_search&&(c+=this.renderSearchBar(s)),e.show_filters&&e.activity_types&&e.activity_types.length>0&&(c+=this.renderTypeFilters(e.activity_types,s)),this.r||this.t.length>0)){let g=s.startsWith("de")?"Ergebnisse":s.startsWith("fr")?"r\xE9sultats":s.startsWith("it")?"risultati":"results";c+=`
          <div class="sa-results-count">
            ${l.length} ${g}
            ${this.r?` f\xFCr "${p(this.r)}"`:""}
          </div>
        `}let d="";try{let g=e.template_type;g==="carousel"?d=this.renderCarousel(l,t,e):g==="map"?d=this.renderMap(l,t,e):d=this.renderGrid(l,t,e)}catch(g){console.error("[SA Widget] Error rendering section:",g),d=`<div class="sa-error">Error rendering section: ${g}</div>`}let n=document.createElement("div");n.className="sa-section sa-section-progressive",n.setAttribute("data-section-id",t.section_id),h&&n.setAttribute("style","margin-top: 48px;"),n.innerHTML=c+d,i.appendChild(n)}addFooter(){let t=this.e.getElementById("sa-progressive-widget");if(!t)return;let a=`
      <div class="sa-footer">
        <div class="sa-powered">
          Powered by <a href="https://www.swissactivities.com" target="_blank" rel="dofollow" class="sa-powered-link">Swiss Activities</a>
        </div>
        <div class="sa-powered-tagline">More than 300,000 happy customers</div>
      </div>
    `,e=document.createElement("div");e.innerHTML=a,t.appendChild(e.firstElementChild)}render(){let{loading:t,data:a,error:e}=this.a,{theme:i}=this.config,r=this.getStyles(i),s;t?s=this.renderSkeleton():e?s=this.renderError(e):a?s=this.renderWidget(a):s='<div class="sa-empty">No data</div>',this.e.innerHTML=`<style>${r}</style>${s}`,a&&!t&&!e&&this.attachEventHandlers()}updateSection(t,a){let e=this.e.querySelector(`[data-section-id="${t}"]`);e&&(e.innerHTML=a,this.attachEventHandlers())}renderSkeleton(){return`
      <div class="sa-widget" role="status" aria-live="polite" aria-label="Loading activities">
        <div class="sa-skeleton-message">
          <svg class="sa-spinner" viewBox="0 0 24 24" width="32" height="32">
            <circle class="sa-spinner-track" cx="12" cy="12" r="10" fill="none" stroke-width="3"/>
            <circle class="sa-spinner-head" cx="12" cy="12" r="10" fill="none" stroke-width="3"/>
          </svg>
          <p class="sa-loading-text">Aktivit\xE4ten werden geladen...</p>
        </div>
        <div class="sa-skeleton">
          <div class="sa-skel-item"></div>
          <div class="sa-skel-item"></div>
          <div class="sa-skel-item"></div>
        </div>
      </div>
    `}renderSectionSkeleton(){return`
      <div class="sa-section-skeleton">
        <div class="sa-skel-title"></div>
        <div class="sa-skeleton">
          <div class="sa-skel-item"></div>
          <div class="sa-skel-item"></div>
        </div>
      </div>
    `}renderError(t){return`
      <div class="sa-widget sa-error" role="alert">
        <p>\u26A0\uFE0F Konnte Widget nicht laden</p>
        <button class="sa-btn-retry" id="retry">Erneut versuchen</button>
      </div>
    `}renderWidget(t){try{let{sections:a,template_type:e}=t;return!a||a.length===0?'<div class="sa-empty">Keine Aktivit\xE4ten verf\xFCgbar</div>':(a.length,`
      <div class="sa-widget">
        ${a.map((r,s)=>{let l=r.activities||[],h=s>0?'style="margin-top: 48px;"':"";`${s}`,r.section_name,l.length;let c="";try{e==="carousel"?c=this.renderCarousel(l,r,t):e==="map"?c=this.renderMap(l,r,t):c=this.renderGrid(l,r,t)}catch(d){console.error("[SA Widget] Error rendering section:",d),c=`<div class="sa-error">Error rendering section: ${d}</div>`}return`<div class="sa-section" data-section-id="${r.section_id}" ${h}>${c}</div>`}).join("")}
        <div class="sa-footer">
          <div class="sa-powered">
            Powered by <a href="https://www.swissactivities.com" target="_blank" rel="dofollow" class="sa-powered-link">Swiss Activities</a>
          </div>
          <div class="sa-powered-tagline">More than 300,000 happy customers</div>
        </div>
      </div>
    `)}catch(a){return console.error("[SA Widget] Error in renderWidget:",a),`<div class="sa-error">Widget render error: ${a}</div>`}}renderGrid(t,a,e){let i=a.booking_button_text||"Jetzt buchen",r=(e.widget_brand_color||e.cta_color||"22678c").replace(/^#/,""),s=e.button_text_color||"#FFFFFF",l=e.widget_show_navigation!==!1,h=e.widget_navigation_tab||"booking",c=a.section_locale||e.locale||"de-CH",d=c.split("-")[0],n=e.locale||"de-CH",g=c.startsWith("de")?"gebucht":c.startsWith("fr")?"r\xE9serv\xE9":c.startsWith("it")?"prenotato":"booked",u=this.s?t:t.slice(0,this.i),y=!this.s&&t.length>this.i,$=u.map(o=>{var k,_;let w=((k=o.rating)==null?void 0:k.average)||0,x=((_=o.rating)==null?void 0:_.count)||0,b=o.tickets_issued||0;return`
      <article class="sa-card" data-activity-id="${o.id}">
        <div class="sa-card-image-wrapper" data-image-container="${o.id}">
          ${o.image_url?`
            <img 
              class="sa-card-img" 
              src="${p(o.image_url)}" 
              alt="${p(o.title)}"
              loading="lazy"
              width="300"
              height="200"
              style="background: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0); background-size: 200% 100%;"
            />
          `:""}
          <button class="sa-gallery-prev" data-activity-id="${o.id}" aria-label="Previous image">
            <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
              <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
            </svg>
          </button>
          <button class="sa-gallery-next" data-activity-id="${o.id}" aria-label="Next image">
            <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
              <path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
            </svg>
          </button>
          ${o.subtitle?`
            <div class="sa-badge-category sa-badge-desktop">${p(o.subtitle)}</div>
          `:""}
          <div class="sa-gallery-indicator" data-gallery-indicator="${o.id}"></div>
        </div>
        
        <div class="sa-card-body">
          <div class="sa-card-header">
            ${o.subtitle?`
              <div class="sa-badge-category" style="background: ${e.cta_color||"#22678c"} !important;">${p(o.subtitle)}</div>
            `:""}
            ${w>0?`
              <div class="sa-badge-review">
                <svg class="sa-star-icon" viewBox="0 0 24 24" width="10" height="10" fill="currentColor">
                  <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
                </svg>
                ${w.toFixed(1)} <span class="sa-badge-review-count">(${x})</span>
              </div>
            `:""}
          </div>
          <h3 class="sa-card-title">${p(o.title)}</h3>
          
          ${b>0||o.duration||w>0?`
            <div class="sa-stats-row">
              ${w>0?`
                <span class="sa-stat-item sa-stat-rating">
                  <svg class="sa-star-icon" viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
                    <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
                  </svg>
                  ${w.toFixed(1)} <span class="sa-badge-review-count">(${x})</span>
                </span>
              `:""}
              ${w>0&&b>0?" ":""}
              ${b>0?`
                <span class="sa-stat-item">
                  <svg class="sa-stat-icon sa-ticket-icon" viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
                    <path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"/>
                    <path d="M13 5v2M13 17v2M13 11v2"/>
                  </svg>
                  ${b>1e3?(b/1e3).toFixed(1)+"K":b}+ ${g}
                </span>
              `:""}
              ${b>0&&o.duration?" ":""}
              ${o.duration?`
                <span class="sa-stat-item">
                  <svg class="sa-stat-icon sa-clock-icon" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2">
                    <circle cx="12" cy="12" r="10"/>
                    <path d="M12 6v6l4 2"/>
                  </svg>
                  ${p(o.duration)}h
                </span>
              `:""}
            </div>
          `:""}
          
          ${o.supplier?`
            <div class="sa-supplier-row">
              <svg class="sa-building-icon" viewBox="0 0 24 24" width="10" height="10" fill="none" stroke="currentColor" stroke-width="2">
                <rect width="16" height="20" x="4" y="2" rx="2" ry="2"/>
                <path d="M9 22v-4h6v4M8 6h.01M16 6h.01M12 6h.01M12 10h.01M12 14h.01M16 10h.01M16 14h.01M8 10h.01M8 14h.01"/>
              </svg>
              <span class="sa-supplier-name">${p(o.supplier)}</span>
            </div>
          `:""}
          
          <div class="sa-card-footer">
            <div class="sa-price-wrapper">
              <span class="sa-price-label">ab</span>
              <span class="sa-price-value">CHF ${typeof o.price_from=="number"?o.price_from.toFixed(0):Math.round(parseFloat(o.price_from||"0"))}</span>
            </div>
            <div 
              class="sa-btn-book" 
              data-activity-id="${o.id}"
              style="background: ${e.cta_color||"#22678c"}; color: ${s};"
            >
              ${p(i)}
            </div>
            <swiss-activities-widget
              style="display: none;"
              ident="${o.id}"
              ${e.affiliate_id?`affiliate="${e.affiliate_id}"`:""}
              ${e.return_url?`return-url="${p(e.return_url)}"`:""}
              ${e.widget_logo_url?`widget-logo-url="${p(e.widget_logo_url)}"`:""}
              language="${d}"
              display="widget"
              widget-brand-color="${r}"
              widget-show-navigation="${l}"
              widget-navigation-tab="${h}"
              booking="true"
              button-text="${p(i)}"
              button-background="${e.cta_color||"#22678c"}"
              button-color="${s}"
              data-use-global-script="true"
            >
              <button type="button" data-action="book">${p(i)}</button>
            </swiss-activities-widget>
          </div>
        </div>
      </article>
    `}).join(""),f=n.startsWith("de")?"Weitere laden":n.startsWith("fr")?"Charger plus":n.startsWith("it")?"Carica altro":"Load more";return`
      <div>
        ${a.section_name?`<h2 class="sa-section-title">${p(a.section_name)}</h2>`:""}
        ${a.section_subtitle?`<p class="sa-section-subtitle">${p(a.section_subtitle)}</p>`:""}
        <div class="sa-grid">
          ${$}
        </div>
        ${y?`
          <div class="sa-load-more-container">
            <button class="sa-load-more-btn" id="sa-load-more">
              ${f} (${t.length-this.i} ${n.startsWith("de")?"weitere":"more"})
            </button>
          </div>
        `:""}
      </div>
    `}renderCarousel(t,a,e){let i=a.booking_button_text||"Jetzt buchen",r=(e.widget_brand_color||e.cta_color||"22678c").replace(/^#/,""),s=e.button_text_color||"#FFFFFF",l=e.widget_show_navigation!==!1,h=e.widget_navigation_tab||"booking",c=a.section_locale||e.locale||"de-CH",d=c.split("-")[0],n=e.locale||"de-CH",g=c.startsWith("de")?"gebucht":c.startsWith("fr")?"r\xE9serv\xE9":c.startsWith("it")?"prenotato":"booked",u=t.map(f=>{var b,k;let o=((b=f.rating)==null?void 0:b.average)||0,w=((k=f.rating)==null?void 0:k.count)||0,x=f.tickets_issued||0;return`
      <article class="sa-card" data-activity-id="${f.id}">
        <div class="sa-card-image-wrapper" data-image-container="${f.id}">
          ${f.image_url?`
            <img 
              class="sa-card-img" 
              src="${p(f.image_url)}" 
              alt="${p(f.title)}"
              loading="lazy"
              width="280"
              height="200"
              style="background: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0); background-size: 200% 100%;"
            />
          `:""}
          <button class="sa-gallery-prev" data-activity-id="${f.id}" aria-label="Previous image">
            <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
              <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
            </svg>
          </button>
          <button class="sa-gallery-next" data-activity-id="${f.id}" aria-label="Next image">
            <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
              <path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
            </svg>
          </button>
          ${f.subtitle?`
            <div class="sa-badge-category sa-badge-desktop">${p(f.subtitle)}</div>
          `:""}
          <div class="sa-gallery-indicator" data-gallery-indicator="${f.id}"></div>
        </div>
        
        <div class="sa-card-body">
          <div class="sa-card-header">
            ${f.subtitle?`
              <div class="sa-badge-category" style="background: ${e.cta_color||"#22678c"} !important;">${p(f.subtitle)}</div>
            `:""}
            ${o>0?`
              <div class="sa-badge-review">
                <svg class="sa-star-icon" viewBox="0 0 24 24" width="10" height="10" fill="currentColor">
                  <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
                </svg>
                ${o.toFixed(1)} <span class="sa-badge-review-count">(${w})</span>
              </div>
            `:""}
          </div>
          <h3 class="sa-card-title">${p(f.title)}</h3>
          
          ${x>0||f.duration||o>0?`
            <div class="sa-stats-row">
              ${o>0?`
                <span class="sa-stat-item sa-stat-rating">
                  <svg class="sa-star-icon" viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
                    <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
                  </svg>
                  ${o.toFixed(1)} <span class="sa-badge-review-count">(${w})</span>
                </span>
              `:""}
              ${o>0&&x>0?" ":""}
              ${x>0?`
                <span class="sa-stat-item">
                  <svg class="sa-stat-icon sa-ticket-icon" viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
                    <path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2 Z"/>
                    <path d="M13 5v2M13 17v2M13 11v2"/>
                  </svg>
                  ${x>1e3?(x/1e3).toFixed(1)+"K":x}+ ${g}
                </span>
              `:""}
              ${x>0&&f.duration?" ":""}
              ${f.duration?`
                <span class="sa-stat-item">
                  <svg class="sa-stat-icon sa-clock-icon" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2">
                    <circle cx="12" cy="12" r="10"/>
                    <path d="M12 6v6l4 2"/>
                  </svg>
                  ${p(f.duration)}h
                </span>
              `:""}
            </div>
          `:""}
          
          <div class="sa-card-footer">
            <div class="sa-price-wrapper">
              <span class="sa-price-label">ab</span>
              <span class="sa-price-value">CHF ${typeof f.price_from=="number"?f.price_from.toFixed(0):Math.round(parseFloat(f.price_from||"0"))}</span>
            </div>
            <div 
              class="sa-btn-book" 
              data-activity-id="${f.id}"
              style="background: ${e.cta_color||"#22678c"}; color: ${s};"
            >
              ${p(i)}
            </div>
            <swiss-activities-widget
              style="display: none;"
              ident="${f.id}"
              ${e.affiliate_id?`affiliate="${e.affiliate_id}"`:""}
              ${e.return_url?`return-url="${p(e.return_url)}"`:""}
              ${e.widget_logo_url?`widget-logo-url="${p(e.widget_logo_url)}"`:""}
              language="${d}"
              display="widget"
              widget-brand-color="${r}"
              widget-show-navigation="${l}"
              widget-navigation-tab="${h}"
              booking="true"
              button-text="${p(i)}"
              button-background="${e.cta_color||"#22678c"}"
              button-color="${s}"
              data-use-global-script="true"
            >
              <button type="button" data-action="book">${p(i)}</button>
            </swiss-activities-widget>
          </div>
          
          ${f.supplier?`
            <div class="sa-supplier-row">
              <svg class="sa-building-icon" viewBox="0 0 24 24" width="10" height="10" fill="none" stroke="currentColor" stroke-width="2">
                <rect width="16" height="20" x="4" y="2" rx="2" ry="2"/>
                <path d="M9 22v-4h6v4M8 6h.01M16 6h.01M12 6h.01M12 10h.01M12 14h.01M16 10h.01M16 14h.01M8 10h.01M8 14h.01"/>
              </svg>
              <span class="sa-supplier-name">${p(f.supplier)}</span>
            </div>
          `:""}
        </div>
      </article>
    `}).join(""),y=Math.ceil(t.length/3),$=Array.from({length:Math.min(y,8)},(f,o)=>`<button class="sa-carousel-dot ${o===0?"active":""}" data-carousel-index="${o}" aria-label="Go to slide ${o+1}"></button>`).join("");return`
      <div>
        ${a.section_name?`<h2 class="sa-section-title">${p(a.section_name)}</h2>`:""}
        ${a.section_subtitle?`<p class="sa-section-subtitle">${p(a.section_subtitle)}</p>`:""}
        <div class="sa-carousel-wrapper has-scroll-right" data-carousel-wrapper>
          <button class="sa-carousel-nav sa-carousel-nav-prev" data-carousel-prev aria-label="Previous">
            <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
              <path d="M15 18l-6-6 6-6"/>
            </svg>
          </button>
          <div class="sa-grid-carousel" data-carousel-scroll>
            ${u}
          </div>
          <button class="sa-carousel-nav sa-carousel-nav-next" data-carousel-next aria-label="Next">
            <svg viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
              <path d="M9 18l6-6-6-6"/>
            </svg>
          </button>
        </div>
        ${y>1?`<div class="sa-carousel-dots">${$}</div>`:""}
      </div>
    `}renderMap(t,a,e){let i=a.booking_button_text||"Jetzt buchen",r=(e.widget_brand_color||e.cta_color||"22678c").replace(/^#/,""),s=e.button_text_color||"#FFFFFF",l=e.widget_show_navigation!==!1,h=e.widget_navigation_tab||"booking",c=a.section_locale||e.locale||"de-CH",d=c.split("-")[0],n=e.locale||"de-CH",g=c.startsWith("de")?"gebucht":c.startsWith("fr")?"r\xE9serv\xE9":c.startsWith("it")?"prenotato":"booked",u=this.s?t:t.slice(0,this.i),y=!this.s&&t.length>this.i,$=u.map(o=>{var k,_;let w=((k=o.rating)==null?void 0:k.average)||0,x=((_=o.rating)==null?void 0:_.count)||0,b=o.tickets_issued||0;return`
      <article class="sa-card" data-activity-id="${o.id}">
        <div class="sa-card-image-wrapper" data-image-container="${o.id}">
        ${o.image_url?`
          <img 
              class="sa-card-img" 
            src="${p(o.image_url)}" 
            alt="${p(o.title)}"
            loading="lazy"
              width="300"
              height="200"
              style="background: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0); background-size: 200% 100%;"
          />
        `:""}
          <button class="sa-gallery-prev" data-activity-id="${o.id}" aria-label="Previous image">
            <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
              <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
            </svg>
          </button>
          <button class="sa-gallery-next" data-activity-id="${o.id}" aria-label="Next image">
            <svg viewBox="0 0 24 24" width="20" height="20" fill="currentColor">
              <path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
            </svg>
          </button>
          <div class="sa-gallery-indicator" data-gallery-indicator="${o.id}"></div>
          </div>
        
        <div class="sa-card-body">
          <div class="sa-card-header">
            ${o.subtitle?`
              <div class="sa-badge-category" style="background: ${e.cta_color||"#22678c"} !important;">${p(o.subtitle)}</div>
            `:""}
            ${w>0?`
              <div class="sa-badge-review">
                <svg class="sa-star-icon" viewBox="0 0 24 24" width="10" height="10" fill="currentColor">
                  <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
                </svg>
                ${w.toFixed(1)}${x>0?`<span class="sa-badge-review-count">(${x>1e3?(x/1e3).toFixed(1)+"K":x})</span>`:""}
              </div>
            `:""}
          </div>
          <h3 class="sa-card-title">${p(o.title)}</h3>
          
          ${b>0||o.duration?`
            <div class="sa-stats-row">
              ${b>0?`
                <span class="sa-stat-item">
                  <svg class="sa-stat-icon sa-ticket-icon" viewBox="0 0 24 24" width="12" height="12" fill="currentColor">
                    <path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"/>
                    <path d="M13 5v2M13 17v2M13 11v2"/>
                  </svg>
                  ${b>1e3?(b/1e3).toFixed(1)+"K":b}+ ${g}
                </span>
              `:""}
              ${b>0&&o.duration?" ":""}
              ${o.duration?`
                <span class="sa-stat-item">
                  <svg class="sa-stat-icon sa-clock-icon" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2">
                    <circle cx="12" cy="12" r="10"/>
                    <path d="M12 6v6l4 2"/>
                  </svg>
                  ${p(o.duration)}h
                </span>
              `:""}
            </div>
          `:""}
          
          ${o.supplier?`
            <div class="sa-supplier-row">
              <svg class="sa-building-icon" viewBox="0 0 24 24" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2">
                <rect width="16" height="20" x="4" y="2" rx="2" ry="2"/>
                <path d="M9 22v-4h6v4M8 6h.01M16 6h.01M12 6h.01M12 10h.01M12 14h.01M16 10h.01M16 14h.01M8 10h.01M8 14h.01"/>
              </svg>
              <span class="sa-supplier-name">${p(o.supplier)}</span>
            </div>
          `:""}
          
          <div class="sa-card-footer">
            <div class="sa-price-wrapper">
              <span class="sa-price-label">ab</span>
              <span class="sa-price-value">CHF ${typeof o.price_from=="number"?o.price_from.toFixed(0):Math.round(parseFloat(o.price_from||"0"))}</span>
            </div>
            <div 
              class="sa-btn-book" 
              data-activity-id="${o.id}"
              style="background: ${e.cta_color||"#22678c"}; color: ${s};"
            >
              ${p(i)}
            </div>
            <swiss-activities-widget
              style="display: none;"
              ident="${o.id}"
              ${e.affiliate_id?`affiliate="${e.affiliate_id}"`:""}
              ${e.return_url?`return-url="${p(e.return_url)}"`:""}
              ${e.widget_logo_url?`widget-logo-url="${p(e.widget_logo_url)}"`:""}
              language="${d}"
              display="widget"
              widget-brand-color="${r}"
              widget-show-navigation="${l}"
              widget-navigation-tab="${h}"
              booking="true"
              button-text="${p(i)}"
              button-background="${e.cta_color||"#22678c"}"
              button-color="${s}"
              data-use-global-script="true"
            >
              <button type="button" data-action="book">${p(i)}</button>
            </swiss-activities-widget>
          </div>
        </div>
      </article>
    `}).join(""),f=n.startsWith("de")?"Weitere laden":n.startsWith("fr")?"Charger plus":n.startsWith("it")?"Carica altro":"Load more";return`
      <div>
        ${a.section_name?`<h2 class="sa-section-title">${p(a.section_name)}</h2>`:""}
        ${a.section_subtitle?`<p class="sa-section-subtitle">${p(a.section_subtitle)}</p>`:""}
        <div class="sa-map-container" id="map-${a.section_id}" data-activities='${JSON.stringify(t.filter(o=>o.meeting_points&&o.meeting_points.length>0).map(o=>({id:o.id,title:o.title,meeting_points:o.meeting_points})))}'>
          <div class="sa-map-placeholder">
            <svg viewBox="0 0 24 24" width="48" height="48" stroke="currentColor" fill="none">
              <path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z" stroke-width="2"/>
              <circle cx="12" cy="10" r="3" stroke-width="2"/>
            </svg>
            <p>Interaktive Karte</p>
            <p class="sa-map-hint">Aktivit\xE4ten in der Region</p>
          </div>
        </div>
        <div class="sa-grid">
          ${$}
        </div>
        ${y?`
          <div class="sa-load-more-container">
            <button class="sa-load-more-btn" id="sa-load-more">
              ${f} (${t.length-this.i} ${n.startsWith("de")?"weitere":"more"})
            </button>
          </div>
        `:""}
      </div>
    `}attachEventHandlers(){let t=this.e.getElementById("retry");t==null||t.addEventListener("click",()=>this.load(),{once:!0});let a=this.e.getElementById("sa-search-input");if(a){let d;a.addEventListener("input",n=>{clearTimeout(d);let g=n.target.value;d=window.setTimeout(()=>{this.r=g,this.s=g.length>0||this.t.length>0,this.i=16,this.updateURLParameters(),this.reRenderSections()},500)})}let e=this.e.getElementById("sa-search-clear");e==null||e.addEventListener("click",()=>{this.r="",this.s=this.t.length>0,this.i=16;let d=this.e.getElementById("sa-search-input");d&&(d.value=""),this.updateURLParameters(),this.reRenderSections()}),this.e.querySelectorAll(".sa-filter-chip").forEach(d=>{d.addEventListener("click",n=>{n.preventDefault();let g=d.dataset.filterType;if(g){if(g==="all")this.t=[];else{let u=this.t.indexOf(g);u>-1?this.t.splice(u,1):this.t=[g]}this.s=this.t.length>0||this.r.length>0,this.i=16,this.o=!1,this.updateURLParameters(),this.reRenderSections()}})});let r=this.e.getElementById("sa-more-filters");r==null||r.addEventListener("click",d=>{d.preventDefault(),this.o=!this.o,this.reRenderSections()});let s=this.e.getElementById("sa-load-more");s==null||s.addEventListener("click",d=>{d.preventDefault(),this.i+=16,this.reRenderSections()}),this.e.querySelectorAll(".sa-btn-book, .sa-btn-book-sm, .sa-btn-book-xs").forEach(d=>{d.addEventListener("click",async n=>{n.preventDefault(),n.stopPropagation();let g=d.dataset.activityId;if(!g)return;this.showBookingOverlay(),await this.deferredScriptLoad();let u=this.e.querySelector(`swiss-activities-widget[ident="${g}"]`);if(u){let y=u.querySelector("button");y&&(y.click(),`${g}`)}})});let h=this.e.querySelectorAll(".sa-gallery-prev"),c=this.e.querySelectorAll(".sa-gallery-next");h.forEach(d=>{d.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation();let g=d.dataset.activityId;g&&this.navigateGallery(g,-1)})}),c.forEach(d=>{d.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation();let g=d.dataset.activityId;g&&this.navigateGallery(g,1)})}),this.initCarouselNavigation()}initCarouselNavigation(){this.e.querySelectorAll("[data-carousel-wrapper]").forEach(a=>{var d;let e=a.querySelector("[data-carousel-scroll]"),i=a.querySelector("[data-carousel-prev]"),r=a.querySelector("[data-carousel-next]"),s=(d=a.parentElement)==null?void 0:d.querySelectorAll(".sa-carousel-dot");if(!e)return;let l=340,h=()=>{let n=e.scrollLeft,g=e.scrollWidth-e.clientWidth;if(a.classList.toggle("has-scroll-left",n>20),a.classList.toggle("has-scroll-right",n<g-20),s&&s.length>0){let u=Math.round(n/(l*3));s.forEach((y,$)=>{y.classList.toggle("active",$===u)})}},c=n=>{let g=l*2,u=n==="next"?e.scrollLeft+g:e.scrollLeft-g;e.scrollTo({left:u,behavior:"smooth"})};i==null||i.addEventListener("click",n=>{n.preventDefault(),c("prev")}),r==null||r.addEventListener("click",n=>{n.preventDefault(),c("next")}),s==null||s.forEach((n,g)=>{n.addEventListener("click",()=>{e.scrollTo({left:g*l*3,behavior:"smooth"})})}),e.addEventListener("scroll",h,{passive:!0}),h(),window.addEventListener("resize",h,{passive:!0})})}reRenderSections(){if(!this.a.data)return;let t=this.e.getElementById("sa-sections-container");if(!t)return;t.innerHTML="",(this.a.data.sections||[]).forEach((e,i)=>{this.renderSingleSection(e,i,this.a.data)}),this.attachEventHandlers(),this.a.data.template_type==="map"&&setTimeout(()=>this.initializeLeafletMap(),100)}async loadLeaflet(){return typeof window>"u"?!1:!!window.L}async initializeLeafletMap(){let t=this.e.querySelector(".sa-map-container");if(!t){console.warn("[SA Widget] Map container not found");return}if(!await this.loadLeaflet()){console.warn("[SA Widget] Leaflet not loaded. Add Leaflet CDN to use map.");return}let e=window.L;if(!e)return;let i=[];try{let s=t.getAttribute("data-activities");s&&(i=JSON.parse(s))}catch(s){console.error("[SA Widget] Failed to parse activities data:",s)}let r=i.filter(s=>s.meeting_points&&s.meeting_points.length>0&&s.meeting_points[0].latitude&&s.meeting_points[0].longitude);if(r.length===0){console.warn("[SA Widget] No activities with coordinates for map");return}try{this.g&&this.g.remove();let s=e.map(t).setView([46.8,8.3],8);e.tileLayer("https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="https://carto.com/attributions">CARTO</a>',subdomains:"abcd",maxZoom:20}).addTo(s);let l=[];r.forEach(h=>{let c=h.meeting_points[0],d=parseFloat(c.latitude),n=parseFloat(c.longitude);if(isNaN(d)||isNaN(n))return;l.push([d,n]);let g=e.marker([d,n]).addTo(s),u=`
          <div style="min-width: 200px;">
            <h3 style="margin: 0 0 8px 0; font-size: 14px; font-weight: 600;">${p(h.title)}</h3>
            <p style="margin: 0; font-size: 12px; color: #666;">${p(c.display_text||c.label)}</p>
          </div>
        `;g.bindPopup(u)}),l.length>0&&s.fitBounds(l,{padding:[50,50]}),this.g=s,`${r.length}`}catch(s){console.error("[SA Widget] Map initialization error:",s)}}async navigateGallery(t,a){this.c.has(t)||await this.fetchGallery(t);let e=this.c.get(t);if(!e||e.length===0)return;let r=((this.p.get(t)||0)+a+e.length)%e.length;this.p.set(t,r);let s=this.e.querySelector(`[data-image-container="${t}"]`);if(s){let l=s.querySelector("img"),h=this.e.querySelector(`[data-gallery-indicator="${t}"]`);if(l&&e[r]){let c=e[r].url,d=c.includes("imgix.net")?`${c}${c.includes("?")?"&":"?"}auto=format,compress&fit=crop&crop=edges&w=400&h=300`:c,n=new Image;n.onload=()=>{l.style.opacity="0",setTimeout(()=>{l.src=d,l.alt=e[r].alternativeText||"Activity image",requestAnimationFrame(()=>{l.style.opacity="1"})},200)},n.src=d}h&&this.updateGalleryDots(t,r+1,e.length+1)}}async fetchGallery(t){let{apiUrl:a,locale:e}=this.config,i=e.replace("-","_");try{`${t}`;let r=await fetch(`https://www.swissactivities.com/api/data/v1/activity/?locale=${i}&id=${t}`);if(!r.ok){console.error(`[Gallery] API error ${r.status}`);return}let l=(await r.json()).gallery||[];this.c.set(t,l),this.p.set(t,0),`${l.length}${t}`,this.e.querySelector(`[data-gallery-indicator="${t}"]`)&&l.length>0&&this.updateGalleryDots(t,0,l.length+1)}catch(r){console.error("[Gallery] Fetch error:",r)}}getStyles(t){var e,i;let a=((e=this.a.data)==null?void 0:e.widget_brand_color)||((i=this.a.data)==null?void 0:i.cta_color);return S(t,a)}},z=`
  .sa-booking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: saOverlayFadeIn 0.3s ease;
  }

  .sa-booking-overlay.sa-overlay-closing {
    animation: saOverlayFadeOut 0.3s ease;
  }

  .sa-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
  }

  .sa-overlay-content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    min-width: 200px;
    animation: saOverlaySlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sa-overlay-spinner {
    margin-bottom: 16px;
  }

  .sa-spinner-circle {
    stroke-dasharray: 126;
    stroke-dashoffset: 126;
    animation: saSpinnerDash 1.5s ease-in-out;
    transform-origin: center;
  }

  .sa-overlay-spinner svg {
    animation: saSpinnerRotate 1.2s linear infinite;
  }

  .sa-overlay-progress {
    width: 100%;
    height: 3px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
  }

  .sa-overlay-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    animation: saOverlayProgress 1.5s ease-in-out;
  }

  @keyframes saOverlayFadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes saOverlayFadeOut {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
    }
  }

  @keyframes saOverlaySlideIn {
    from {
      opacity: 0;
      transform: translateY(-20px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }

  @keyframes saSpinnerRotate {
    100% {
      transform: rotate(360deg);
    }
  }

  @keyframes saSpinnerDash {
    0% {
      stroke-dashoffset: 126;
    }
    50% {
      stroke-dashoffset: 32;
    }
    100% {
      stroke-dashoffset: 126;
    }
  }

  @keyframes saOverlayProgress {
    0% {
      width: 0%;
    }
    100% {
      width: 100%;
    }
  }
`;if(typeof document<"u"&&!document.getElementById("sa-overlay-styles")){let v=document.createElement("style");v.id="sa-overlay-styles",v.textContent=z,document.head.appendChild(v)}customElements.get("sa-widget")||customElements.define("sa-widget",L);if(typeof document<"u"){let v=()=>{let m=document.querySelectorAll("[data-sa-widget-id]");m.length&&(console.warn(`[SA Widget] Converting ${m.length} legacy V1 widget(s) to V2`),m.forEach(t=>{var s;let a=t.getAttribute("data-sa-widget-id");if(!a)return;let e=document.createElement("sa-widget");e.setAttribute("widget-id",a);let i=t.getAttribute("data-lang");i&&e.setAttribute("locale",i);let r=t.getAttribute("style");r&&e.setAttribute("style",r),(s=t.parentNode)==null||s.replaceChild(e,t)}))};if(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",v):v(),typeof MutationObserver<"u"){let m=new MutationObserver(a=>{a.some(e=>Array.from(e.addedNodes).some(i=>{var r,s;return i.nodeType===1&&(((r=i.hasAttribute)==null?void 0:r.call(i,"data-sa-widget-id"))||((s=i.querySelectorAll)==null?void 0:s.call(i,"[data-sa-widget-id]").length))}))&&setTimeout(v,100)}),t=()=>m.observe(document.body,{childList:!0,subtree:!0});document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}}})();
