/* Background remover embed: direct HF Space + auto-height crop */

/* Wider panel so Gradio can show image | output side by side */
.ts-tool-panel {
    max-width: min(1100px, 100%);
}

.ts-tool__embed {
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    border: 1.5px dashed rgba(15, 118, 110, 0.28);
    background: #fff;
}

.ts-tool__embed-frame-wrap {
    position: relative;
    width: 100%;
    min-height: 360px;
    height: 440px; /* JS updates as Gradio content grows/shrinks */
    margin: 0;
    border: none;
    overflow: hidden;
    transition: height 0.18s ease;
}

.ts-tool__embed-frame-wrap iframe,
.ts-tool__embed iframe {
    display: block;
    width: 100%;
    border: none;
    background: #fff;
}

@media (max-width: 900px) {
    .ts-tool__embed-frame-wrap {
        height: 720px;
    }
}

@media (max-width: 425px) {
    /* Approximate Gradio .app padding:0 on small screens */
    .ts-tool-panel {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .ts-tool__embed {
        border-radius: 10px;
    }

    .ts-tool__embed-frame-wrap {
        height: 780px;
    }

    .ts-tool__embed-frame-wrap iframe {
        margin-left: -12px;
        width: calc(100% + 24px);
        max-width: none;
    }
}
