/* Boligvælger iFrame — Stylesheet */

.bv-iframe-container {
    position: relative;
    width: 100%;
    /* Fallback only — the shortcode always sets min-height inline
       (configured minimum, or the fixed height when one is given). */
    min-height: 400px;
    overflow: hidden;

    /* Smooth transition when auto-resize adjusts the height */
    transition: height 0.2s ease;
}

.bv-iframe-container .bv-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading-state: vis en spinner indtil iFrame er klar */
.bv-iframe-container::before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #e0e0e0;
    border-top-color: #555;
    border-radius: 50%;
    animation: bv-spin 0.8s linear infinite;
    z-index: 0;
    pointer-events: none;
}

/* Spinner is hidden once the iFrame has loaded (set via JS) */
.bv-iframe-container.bv-loaded::before {
    display: none;
}

@keyframes bv-spin {
    to { transform: rotate(360deg); }
}

/* Shown instead of the spinner when JavaScript is disabled
   (the iFrame src is set by JS, so nothing can load without it) */
.bv-iframe-noscript {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    margin: 0;
    padding: 0 1em;
    text-align: center;
}
