.ifc-viewer {
    position: relative;
    width: 100%;
    height: 500px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: #e7ebed;
    border: 1px solid #c4ccd1;
    border-radius: 4px;
}

.ifc-viewer[hidden] {
    display: none;
}

.ifc-viewer__viewport,
.ifc-viewer__viewport canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.ifc-viewer__viewport {
    touch-action: none;
}

.ifc-viewer__status {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: #24313a;
    background: rgba(240, 242, 243, 0.9);
    text-align: center;
}

.ifc-viewer__status[hidden] {
    display: none;
}

.ifc-viewer__status--error {
    color: #9f311b;
    background: rgba(251, 237, 232, 0.94);
}

.ifc-viewer__spinner {
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 auto;
    border: 2px solid #aab4ba;
    border-top-color: #2f6b8a;
    border-radius: 50%;
    animation: ifc-viewer-spin 0.8s linear infinite;
}

.ifc-viewer__toolbar {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 1;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.ifc-viewer__toolbar[hidden] {
    display: none;
}

.ifc-viewer__hint,
.ifc-viewer__reset {
    color: #24313a;
    background: rgba(250, 251, 251, 0.9);
    border: 1px solid #c4ccd1;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(36, 49, 58, 0.12);
}

.ifc-viewer__hint {
    padding: 0.35rem 0.55rem;
    font-size: 0.75rem;
}

.ifc-viewer__reset {
    padding: 0.4rem 0.7rem;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    pointer-events: auto;
}

.ifc-viewer__reset:hover,
.ifc-viewer__reset:focus-visible {
    background: #fff;
    border-color: #5c6b75;
}

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

@media (max-width: 767.98px) {
    .ifc-viewer {
        height: 380px;
    }

    .ifc-viewer__hint {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ifc-viewer__spinner {
        animation: none;
    }
}
