/* ── Open button ── */
.interactive-scheme--preview {
    position: relative;
}
.interactive-scheme__button {
    position: absolute;
    /*width: 100%;*/
    width: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
}
.animated-button {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 18px;
}
.animated-button-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;

    background-color: #FF6B00;
    border-radius: 100px;
    min-height: 80px;
    min-width: 80px;
    width: 0px;

    transition: all .2s linear;
}
.animated-button-container:hover {
    width: 100%;
}
.animated-button-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background: url(/images/1-tc-web-icons/type-1/color/t1-scale.svg);
    background-repeat: no-repeat;
    background-size: cover;
    flex-shrink: 0;
    margin-left: 24px
}
.animated-button-text {
    word-wrap: break-word;
    white-space: nowrap;
    margin-left: 12px;
    overflow: hidden;
    opacity: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 25px;
    color: white;
    user-select: none;
}
.animated-button-container:hover .animated-button-text {
    opacity: 1;
    margin-right: 24px
}

@media screen and (max-width: 766px) {
    .interactive-scheme__button{
        display: none;
    }
}

/* ── Popup overlay ── */
#popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

#popup-overlay.open {
    display: flex;
}

#popup-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.4);
    padding: 16px;
    /* fit screen with margins */
    margin-top: 76px;
    width: calc(100vw - 46px);
    height: calc(100vh - 116px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.08);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    z-index: 1;
    transition: background 0.15s;
}

#popup-close:hover {
    background: rgba(0,0,0,0.18);
}

#popup-svg-container {
    flex: 1;
    overflow: visible;
    display: block;
    position: relative;
}

/* ── Zoom controls ── */
#zoom-controls {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

#zoom-controls button {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

#zoom-controls button:hover {
    background: #fff;
    border-color: #00b3cd;
    transform: scale(1.05);
}

#zoom-controls button:active {
    transform: scale(0.95);
}

#zoom-level {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

#popup-svg-container svg {
    display: block;
    transform-origin: 0 0;
    max-width: 100%;
    max-height: 100%;
}