/* Compound structure renderer (SMILES -> SVG with uploaded-image fallback) */
.compound-structure {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.compound-structure [hidden] {
    display: none !important;
}

.compound-structure__svg,
.compound-structure__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.compound-structure__svg {
    width: 100%;
    height: 100%;
}

.compound-structure__image {
    width: auto;
    height: auto;
    object-fit: contain;
}

.compound-structure__empty {
    display: flex;
    min-height: 100%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    color: #6a7f76;
    text-align: center;
    font-size: .82rem;
}

.compound-structure__empty i {
    font-size: 1.35rem;
    color: #51786a;
}

.compound-structure--detail {
    min-height: 300px;
    height: 300px;
    padding: 14px;
    border: 1px solid #e2ebe7;
    border-radius: 14px;
    background: #fbfdfc;
}

.compound-structure--detail .compound-structure__svg,
.compound-structure--detail .compound-structure__image {
    max-height: 270px;
}

.compound-structure--card {
    min-height: 220px;
    height: 220px;
    padding: 14px;
}

.compound-structure--card .compound-structure__svg,
.compound-structure--card .compound-structure__image {
    max-height: 190px;
}

.compound-structure--table {
    width: 58px;
    height: 58px;
    padding: 3px;
    border: 1px solid #d9e5df;
    border-radius: 10px;
    background: #fff;
}

.compound-structure--table .compound-structure__empty {
    font-size: 0;
}

.compound-structure--table .compound-structure__empty i {
    font-size: 16px;
}

@media (max-width: 767.98px) {
    .compound-structure--detail {
        min-height: 250px;
        height: 250px;
        padding: 10px;
    }

    .compound-structure--detail .compound-structure__svg,
    .compound-structure--detail .compound-structure__image {
        max-height: 225px;
    }

    .compound-structure--card {
        min-height: 190px;
        height: 190px;
        padding: 10px;
    }

    .compound-structure--card .compound-structure__svg,
    .compound-structure--card .compound-structure__image {
        max-height: 170px;
    }
}
