.imaq3d-block-wrapper {
    margin-top: 0;
    margin-bottom: 0;
}

.imaq3d-popup-row {
    width: 100%;
}

.imaq3d-trigger {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: var(--imaq3d-row-padding, 18px) 0;
    margin: 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0;
    background: transparent;
    color: var(--imaq3d-row-color, inherit);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.imaq3d-trigger:hover .imaq3d-row-title,
.imaq3d-trigger:focus-visible .imaq3d-row-title {
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.imaq3d-trigger:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.imaq3d-row-title {
    min-width: 0;
    flex: 1 1 auto;
    font-size: var(--imaq3d-row-font-size, 18px);
    font-weight: var(--imaq3d-row-font-weight, 700);
    font-style: var(--imaq3d-row-font-style, normal);
    line-height: 1.35;
}

.imaq3d-row-icon {
    flex: none;
    font-size: var(--imaq3d-plus-size, 20px);
    font-weight: 700;
    line-height: 1;
}

.imaq3d-missing-url {
    padding: 0.75rem 1rem;
    border-left: 4px solid #dba617;
    background: #fff8e5;
}

body.imaq3d-modal-open {
    overflow: hidden;
}

.imaq3d-modal[hidden] {
    display: none !important;
}

.imaq3d-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3vh 3vw;
    background: rgba(0, 0, 0, 0.62);
}

.imaq3d-modal-panel {
    width: min(1100px, 94vw);
    height: min(820px, 92vh);
    min-height: 360px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 7px;
    background: #fff;
    color: #111;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.imaq3d-modal-header {
    flex: none;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem 0.75rem 1.25rem;
    border-bottom: 1px solid #ddd;
}

.imaq3d-modal-title {
    margin: 0;
    padding: 0;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.3;
}

.imaq3d-modal-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.imaq3d-fullscreen,
.imaq3d-close {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #222;
    cursor: pointer;
    line-height: 1;
}

.imaq3d-fullscreen {
    font-size: 1.35rem;
}

.imaq3d-close {
    font-size: 2rem;
}

.imaq3d-fullscreen:hover,
.imaq3d-close:hover,
.imaq3d-fullscreen:focus-visible,
.imaq3d-close:focus-visible {
    background: #f0f0f0;
}

.imaq3d-viewer-shell {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #fff;
}

.imaq3d-viewer-host,
.imaq3d-model-viewer {
    width: 100%;
    height: 100%;
}

.imaq3d-model-viewer {
    display: block;
    background: #fff;
}

.imaq3d-status {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: min(420px, 80%);
    padding: 0.7rem 1rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.imaq3d-status.is-error {
    color: #8a1f11;
}

@media (max-width: 700px) {
    .imaq3d-modal {
        padding: 0;
    }

    .imaq3d-modal-panel {
        width: 100vw;
        height: 100dvh;
        min-height: 100vh;
        border-radius: 0;
    }

    .imaq3d-modal-header {
        padding-left: 1rem;
    }
}
