.uroc-maplibre-block {
    position: relative;
    width: 100%;
    overflow: visible;
}

.uroc-maplibre-map {
    width: 100%;
    display: block;
}

/* hidden until JS initialises; noscript fallback shows instead */
.uroc-maplibre-pending {
    display: none;
}

/* no-JS fallback */
.uroc-maplibre-noscript {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #d8dbd6;
}

.uroc-maplibre-noscript-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.uroc-maplibre-noscript-notice {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 4px;
    white-space: nowrap;
    margin: 0;
    pointer-events: none;
}

/* editor hint overlay */
.uroc-maplibre-editor-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 3px;
    pointer-events: none;
    white-space: nowrap;
}

/* scroll-to-zoom hint */
.uroc-maplibre-scroll-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    pointer-events: none;
    z-index: 100;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.uroc-maplibre-scroll-hint.is-visible {
    opacity: 1;
}

/* corner drag handles */
.uroc-corner-marker {
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid #0066cc;
    border-radius: 3px;
    cursor: grab;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.uroc-corner-marker:active {
    cursor: grabbing;
}

/* pin markers */
.uroc-pin-marker {
    cursor: pointer;
    display: flex;
    align-items: flex-end;
}

.uroc-pin-marker img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

.uroc-pin-marker svg {
    display: block;
    width: 42px;
    height: 60px;
    pointer-events: none;
}

/* inspector pin rows */
.uroc-pin-row {
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
    margin-top: 10px;
}

.uroc-pin-icon-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.uroc-pin-icon-preview {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.uroc-pin-icon-default {
    width: 20px;
    flex-shrink: 0;
}

/* pin popup infowindow */
.uroc-maplibre-block .maplibregl-popup-content {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 4px 14px rgba(0, 0, 0, 0.10);
}

.uroc-maplibre-block .maplibregl-popup-close-button {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.22);
    color: #333;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uroc-maplibre-block .maplibregl-popup-close-button:hover {
    background: #f0f0f0;
    color: #000;
}

.uroc-maplibre-block .uroc-pin-popup--text .maplibregl-popup-close-button {
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #fff;
    padding: 0;
    border-radius: 0;
    font-size: 16px;
    line-height: 16px;
    box-shadow: none;
}

.uroc-maplibre-block .uroc-pin-popup--text .maplibregl-popup-close-button:hover {
    background: #fff;
    color: #d00;
}

.uroc-pin-popup-inner {
    position: relative;
    line-height: 0;
}

.uroc-pin-popup-img {
    display: block;
    width: 100%;
    height: auto;
}

/* Caption overlaid on photo */
.uroc-pin-popup-inner.has-photo .uroc-pin-popup-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 16px);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    padding: 4px 12px;
    border-radius: 4px;
}

/* Caption without photo */
.uroc-pin-popup-inner:not(.has-photo) .uroc-pin-popup-label {
    display: block;
    padding: 10px 52px 10px 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #333;
}

/* inspector popup photo row */
.uroc-pin-popup-photo-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.uroc-pin-popup-photo-preview {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

/* inspector panel helpers */
.uroc-maplibre-num-pair {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.uroc-maplibre-num-pair > div {
    flex: 1;
    min-width: 0;
}

.uroc-maplibre-label {
    display: block;
    font-size: 11px;
    color: #757575;
    margin-bottom: 2px;
}

.uroc-maplibre-hint {
    font-size: 11px;
    color: #757575;
    margin: 0 0 8px;
}
