/* WordPress and page-builder integration. Base design: original-scoped.css. */
.ss-widget {
    container-type: inline-size;
    container-name: ss-stations;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    isolation: isolate;
    line-height: 1.5;
    text-align: left;
    font-size: 16px;
    font-weight: 400;
}

.ss-widget,
.ss-widget *,
.ss-widget *::before,
.ss-widget *::after {
    box-sizing: border-box;
}

.ss-widget [hidden] {
    display: none !important;
}

.ss-widget .ss-section-title {
    display: block;
    font-family: 'Be Vietnam Pro';
    line-height: 1.2;
    margin: 0;
    padding: 0;
    text-align: center;
}

.ss-widget .ss-card-header h3 {
    font: inherit;
    margin: 0;
    padding: 0;
}

.ss-widget button {
    text-transform: none;
    letter-spacing: normal;
    min-height: 0;
    margin: 0;
    box-shadow: none;
    line-height: 1.4;
}

.ss-widget .ss-tab-btn {
    border-radius: 0;
}

.ss-widget a {
    text-decoration: none;
}

.ss-widget .ss-station-select {
    background: transparent;
    border: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
    text-align: left;
    cursor: pointer;
    white-space: normal;
}

.ss-widget .ss-station-select:hover {
    color: #009be1;
}

.ss-widget button:focus-visible,
.ss-widget a:focus-visible,
.ss-widget [tabindex]:focus-visible {
    outline: 3px solid #009be1;
    outline-offset: 3px;
}

.ss-widget .ss-station-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ss-widget .ss-station-card {
    width: auto;
    min-width: 0;
    overflow-wrap: anywhere;
    background: linear-gradient(180deg, #fff 0%, #e5f5fc 100%);
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.ss-widget.has-active-station .ss-station-card {
    opacity: 0.4;
}

.ss-widget.has-active-station .ss-station-card.active {
    opacity: 1;
    border: 1.5px solid #1f2937;
    background: linear-gradient(180deg, #fff 0%, #e5f5fc 100%);
}

.ss-widget .ss-info-column {
    min-width: 0;
}

.ss-widget .ss-section-body {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
    gap: 24px;
    min-height: 0;
    align-items: start;
}

/* Let the offshore portion extend behind the list, closing the empty mainland/list gap. */
.ss-widget .ss-map-column {
    width: calc(100% + 120px);
    max-width: 792px;
    height: auto;
    aspect-ratio: 792 / 854;
}

.ss-widget .vimid-map-container {
    width: 100%;
    max-width: 792px;
    height: auto;
    aspect-ratio: 792 / 854;
}

.ss-widget .ss-info-column {
    width: 100%;
    max-width: none;
    margin: 0;
}

.ss-widget .ss-station-counter {
    margin-top: 0;
    margin-bottom: 24px;
}

.ss-widget .ss-region-tabs {
    gap: clamp(12px, 1.6cqw, 28px);
}

.ss-widget .ss-tab-btn {
    white-space: nowrap;
}

.ss-widget .ss-map-fallback {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    margin: 0;
    padding: 0;
    border: 0;
}

.ss-widget .mcp-frontend-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
}

.ss-widget .vimid-popup,
.ss-widget .vimid-popup.is-visible {
    transform: none;
    transform-origin: center;
    max-width: calc(100% - 16px);
    max-height: calc(100% - 16px);
    overflow: auto;
}

.ss-widget .vimid-popup::before {
    display: none;
}

.ss-widget .vimid-popup-title {
    align-items: flex-start;
}

.ss-widget [data-popup="title"] {
    flex: 1;
    overflow-wrap: anywhere;
}

.ss-widget .ss-popup-close {
    background: none;
    color: #fff;
    border: 0;
    border-radius: 4px;
    font-size: 24px;
    font-weight: 400;
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.ss-widget .ss-popup-close:hover {
    background: #394353;
}

.ss-widget .ss-empty {
    padding: 24px 0;
    color: #64748b;
}

.ss-widget .ss-map-error {
    position: absolute;
    top: 40%;
    left: 10%;
    right: 10%;
    text-align: center;
    padding: 20px;
    background: #f1f5f9;
    border-radius: 8px;
    color: #475569;
}

.ss-widget .ss-station-cards-container {
    overscroll-behavior: contain;
    max-height: clamp(560px, 48cqw, 700px);
    margin-bottom: 0;
    scrollbar-color: #009be1 #f1f5f9;
}

.ss-widget .ss-station-cards-container::-webkit-scrollbar-thumb {
    background: #009be1;
}

.ss-widget .ss-btn-direction {
    line-height: 1.5;
}

@container ss-stations (max-width: 1080px) {
    .ss-widget .ss-section-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
        justify-items: center;
    }

    .ss-widget .ss-map-column {
        width: 100%;
    }

    .ss-widget .ss-info-column {
        max-width: 792px;
    }
}

@container ss-stations (max-width: 640px) {
    .ss-widget .ss-station-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ss-widget .ss-info-column {
        max-width: 100%;
    }

    .ss-widget .ss-station-cards-container {
        max-height: 420px;
    }

    .ss-widget .ss-section-header {
        margin-bottom: 32px;
    }

    .ss-widget .ss-region-tabs {
        gap: 16px;
    }

    .ss-widget .ss-section-body {
        min-height: 0;
    }

    .ss-widget .vimid-popup {
        padding: 10px 12px;
        width: 245px;
    }
}

@media (max-width: 767px) {
    .ss-widget {
        padding: 20px 0 32px;
    }

    .ss-widget .ss-info-column {
        display: none;
    }

    .ss-widget .ss-section-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .ss-widget .ss-map-column {
        width: 100%;
        max-width: none;
        min-width: 0;
        aspect-ratio: auto;
        overflow: clip;
    }

    .ss-widget .vimid-map-container {
        width: 165%;
        max-width: none;
        margin-left: 4%;
    }

    .ss-widget .ss-section-header {
        margin-bottom: 24px;
    }

    .ss-widget .vimid-popup {
        width: 280px;
        max-width: calc(100cqw - 16px);
        padding: 12px 14px;
    }

    .ss-widget .vimid-popup-row {
        font-size: 13px;
    }

    .ss-widget .ss-popup-close {
        width: 36px;
        min-width: 36px;
        height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ss-widget *,
    .ss-widget *::before,
    .ss-widget *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}