.schema-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.schema-tab {
    padding: 0.75rem 1.5rem;
    background-color: var(--color-bg);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.schema-tab:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background-color: var(--color-bg-card);
}

.schema-tab.active {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(30, 160, 170, 0.2);
}

.schema-viewer-wrapper {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    background-color: var(--color-bg);
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

.schema-viewport {
    width: 100%;
    height: 100%;
    cursor: grab;
    position: relative;
}

.schema-viewport:active {
    cursor: grabbing;
}

.schema-content {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    transform-origin: center center;
}

.schema-content.active {
    display: flex;
}

.schema-content svg {
    max-width: 100%;
    max-height: 100%;
    min-width: 600px;
}

.schema-zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background-color: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s ease;
    box-shadow: var(--glass-shadow);
}

.zoom-btn:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.error-report-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.error-report-tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.error-report-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.error-report-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(30, 160, 170, 0.06);
}

.error-report-tooltip {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    font-size: 0.875rem;
    color: var(--color-text);
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 50;
}

.error-report-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 18px;
    width: 10px;
    height: 10px;
    background: var(--color-bg-card);
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    transform: rotate(45deg);
}

.error-report-tooltip-wrapper:hover .error-report-tooltip,
.error-report-tooltip-wrapper:focus-within .error-report-tooltip {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .schema-viewer-wrapper {
        height: 60vh;
        border-radius: 16px;
    }
    .schema-tabs-container {
        gap: 0.5rem;
    }
    .schema-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .error-report-tooltip {
        white-space: normal;
        width: 260px;
        right: 0;
    }
}
